He accepted baptism, and became a vassal of the pope. In 1237 the area passed into the rule of the Teutonic Knights owing to the amalgamation of this order with that of the Brethren of the Sword. The Livonian Confederation was a loosely organized confederation formed by the German-led Livonian Order and various bishoprics that encompassed much of present-day Estonia and Latvia. It existed from 1228 to the 1560s, when it was dismembered during the Livonian Wars. The Duchy of Courland and Semigallia was a semi-independent duchy that existed from 1561 until 1795, encompassing the areas of Courland and Semigallia. Although nominally a vassal state of the Polish-Lithuanian Commonwealth, the dukes operated autonomously. In the 18th century Russia acquired great influence over the Duchy; the future Empress Anna of Russia served as regent there from 1711 until her accession the Russian throne in 1730. After the last of the ducal line into which she had married died in 1737, she arranged for the Duchy to be given to her lover, Ernst Johann von Biron instead. The Duchy was one of the smallest European nations to colonize overseas territories, establishing short-lived outposts on the Caribbean islands of Tobago and Trinidad and at the mouth of the Gambia River in Africa on what was then known as James Island. In 1795, the last Duke, Peter von Biron, ceded the Duchy to the Russian Empire. The former Bishopric of Courland was directly incorporated into the Polish-Lithuanian Commonwealth as the District of Pilten of the Wenden and later Inflanty Voivodeship. After annexation by the Russian Empire, the territory of the former Duchy formed the Courland Governorate. From the time of the Northern Crusades in the early 13th century, most land was owned by nobles descended from the German invaders. In 1863, the Russian authorities issued laws to enable Latvians, who formed the bulk of the population, to acquire the farms which they held, and special banks were founded to help them. By this means, some occupants bought their farms, but the great mass of the population remained landless, and lived as hired labourers, occupying a low position in the social scale. Agriculture was the chief occupation, with the principal crops being rye, barley, oats, wheat, flax, and potatoes.