After Algirdas' death in 1377, Jogaila became the Grand Duke. It is believed that the dynastic disputes that soon erupted between him and his uncle Kęstutis and his cousin Vytautas the Great were largely inspired by Skirgaila. It is known about his travels to the Teutonic Knights in 1379 just a year prior to the controversial Treaty of Dovydiškės. Skirgaila was the chief supporter of his brother Jogaila and helped him to imprison both Kęstutis and Vytautas in Kreva castle during the Lithuanian Civil War. Some historians speculate that Kęstutis' death after a week in prison was in fact assassination carried out by Skirgaila. As a reward for a job well done, Skirgaila received the Duchy of Trakai. When Jogaila was preparing for the Union of Kreva, Skirgaila was actively involved in the negotiations and even headed a diplomatic mission to Poland. The negotiations succeeded and Jogaila married Jadwiga of Poland and was crowned as King of Poland in 1386. He appointed Skirgaila on 13 March 1386 as governor in Lithuania, not only on his behalf but also on behalf of queen Jadwiga and Polish Crown. As ruler of Lithuania, Skirgaila had to deal with his oldest brother Andrei, who still was refusing to accept Jogaila as a Grand Duke. First he defeated Andrei's ally Sviatoslav II of Smolensk in a battle of the Vikhra River near Mstislavl on 29 April 1386, during which Sviatoslav lost his life. Sviatoslav son Yury of Smolensk was forced to accept Lithuanian suzerainty in exchange of princely throne. Later Skirgaila attacked Polatsk; his first expedition in October was unsuccessful, but the next on March 1387 resulted in Andrei's capture and death of his son Simeon, who was killed in a battle. Next month Skirgaila was invested in Polatsk and once again pledged his loyalty to Jogaila, Jadwiga and Polish Crown, promising return of his land in case of his heirless death. Skirgaila was now directly ruling over large portion of Lithuania, including duchy of Vilnius, ruled on behalf of Jogaila. February 20th 1387 Jogaila elevated his brother above other Lithuanian princes and extended his authority over Ruthenian lands. In 1389 he started a new civil war, but after an unsuccessful attack on Vilnius he had to seek help from the Teutonic Knights. In 1392 Jogaila and Vytautas signed the Ostrów Agreement, and Vytautas became his regent of the Grand Duchy of Lithuania. The Duchy of Trakai was returned to Vytautas as his patrimony. As a compensation Skirgaila received a portion of Volhynia and Kiev since 1395. The circumstances surrounding his death are not entirely clear. He was interred in Kiev Pechersk Lavra.