The battle took place in 1435 between Žygimantas Kęstutaitis and Švitrigaila, because they both claimed the throne of the Grand Duke of the Grand Duchy of Lithuania. In 1430,after the death of Vytautas, the Grand Duke of Lithuania, the throne had to go to Jogaila, the King of Poland. The Lithuanian nobility did not want to connect with Poland, so they chose the new Grand Duke. Švitrigaila was chosen to become the Grand Duke. A conspiracy against Švitrigaila was set shortly, the Duke was attacked and fled. After this coup, Žygimantas Kęstutaitis was elected the Grand Duke of the Grand Duchy of Lithuania. The Grand Duchy of Lithuania was divided into the supporters of Švitrigaila and the supporters of Žygimantas Kęstutaitis. It led to the internal war. The land of Lithuania had been havocked for several years. The battle of Pabaiskas was the culmination of these struggles: the enemy troops met near Ukmerge by the Lake Žirnajai. Due to the long-lasting rain, the river Žirnaja flooded and the army of Švitrigaila fell into poor positions and split up. The warriors of Žygimantas Kęstutaitis noticed that and struck their enemy a decisive blow. The army of Švitrigaila was beaten.