The Treaty of Königsberg was signed in Königsberg (Królewiec) on 30 January 1384, during the Lithuanian Civil War (1381–1384) between Vytautas the Great and representatives of the Teutonic Knights. Vytautas waged a civil against his cousin Jogaila, Grand Duke of Lithuania and future King of Poland, and allied himself with the Teutonic Knights. In order to secure Teutonic support in the civil war, Vytautas signed the treaty and granted Samogitia up to the Nevėžis River and Kaunas to the Knights. In 1382 Jogaila promised the Knights Samogitia only up to the Dubysa River, but never ratified the Treaty of Dubysa. Samogitia was important for the Knights as this territory physically separated them from uniting with the Livonian order in the north. Vytautas also promised to become Order's vassal. In February several Samogitian regions acknowledged their support to Vytautas and the Knights.