In 1561 the weakened Livonian Order was dissolved by the Treaty of Vilnius. Very much following the earlier model of Prussian Homage its lands were secularised as the Duchy of Livonia (Lithuanian vassal) and the Duchy of Courland and Semigallia (Polish vassal) were created. The last Master of the Order Gotthard Kettler became the first Duke of Courland and converted to Lutheranism.