 Jonas Kęsgaila was Elder of Samogitia (1449–1485), castellan of Trakai (1477) and Vilnius (1478–1485).Jonas was a powerful magnate in Samogitia and even conducted independent foreign policy with the Teutonic Knights.During the Thirteen Years' War (1454–66), the Samogitians attacked the Knights, including their stronghold in Klaipėda (Memel) in 1455.