In 1389, when her husband's coup to capture Vilnius failed, she was in Hrodna. After the failed coup Anna followed her husband to the Teutonic Knights, where Vytautas asked for an alliance against his cousins Jogaila and Skirgaila in the Lithuanian Civil War (1389–1392). For a while she was held hostage to guarantee that Vytautas would not break the alliance. After the disagreements were settled in 1392, Anna confirmed the Ostrów Agreement, the peace treaty which made Vytautas the Grand Duke of Lithuania. She signed two letters, one given to Jogaila and another to his wife Jadwiga of Poland. Anna continued to be active in political life and attended negotiations for the Treaty of Salynas (1398).