Livonia had been part of the Grand Duchy of Lithuania from 1561, since the
Livonian Order was
secularized by the
Union of Vilnius and the
Livonian Confederation dissolved during the
Livonian Wars. Part of Livonia formed the
Duchy of Courland and Semigallia while the south-west part of today's
Estonia and north-east part of today's
Latvia, covering what are now
Vidzeme and
Latgale, were ceded to the Grand Duchy of Lithuania. In 1566, it was declared the Duchy of Livonia according to the Treaty of Union between the landowners of Livonia and authorities of Lithuania;
Jan Hieronimowicz Chodkiewicz became the first Governor of the Duchy (1566–1578) in
Sigulda Castle. It was a province of
Grand Duchy of Lithuania until 1569. After the
Union of Lublin in 1569, it became a
joint domain of the
Polish Crown and the Grand Duchy.
The larger part of the Duchy was conquered by
Swedish Empire during the
Polish–Swedish War (1621–1625), and their gains were recognized in the
Truce of Altmark in 1629. The Commonwealth retained southeastern parts of the
Wenden Voivodeship, renamed to
Inflanty Voivodeship with the capital in
Daugavpils (
Dyneburg), until the
first Partition of Poland in 1772, when it was annexed by
Catherine the Great's
Russian Empire. The title "Prince of Livonia" was added to the grand title of later
Russian Emperors. to king Stephen Báthory, who granted city rights to the city of Valga in 1584. Texts in Estonian, Hungarian and Polish. ==Administrative divisions==