Accounts on Švitrigaila's activities in 1394–1397 are conflicting. Older historians followed Jan Długosz and claimed that he escaped to the Teutonic Knights in Prussia right after the capture of Vitebsk, but Polish historian Aleksander Narcyz Przezdziecki disproved it. Probably around 1396 or 1397, Švitrigaila and Fedor, son of Liubartas who was ousted from Volhynia near the conclusion of the Galicia–Volhynia Wars, escaped from Kraków to Duchy of Cieszyn, fief of the Kingdom of Bohemia, and from there to the court of Sigismund of Luxemburg. Švitrigaila contacted the Teutonic Knights, a long-standing enemy of Lithuania, and proposed an alliance against Vytautas. It was not an unprecedented move: Vytautas had done the same in 1382 and 1390 when he fought with Jogaila. However, the Knights concluded the Treaty of Salynas with Vytautas in October 1398 and Švitrigaila lost any hopes of an armed rebellion. He reconciled with Vytautas and received Navahrudak and a portion of Podolia not ruled by Spytek of Melsztyn.