In 1382, during the Lithuanian Civil War, Kęstutis was imprisoned at the Kreva Castle and died. His nephew Skirgaila was named the new Duke of Trakai by his brother Grand Duke Jogaila.