After the Livonian War (1558–1582), Lithuania acquired vassal state Duchy of Courland with capital in Jelgava.