pack in the Gulf of Riga to reach Oesel Island. Also, this territory kept the Livonian Branch of the Teutonic Order separated from the Prussian Branch. Castles played an important role in the strategy of the Livonian Order to expand into the Semigallian territory. They followed the line of rivers and some of them were established on native fortification sites. In 1250, the whole of Semigallia was conquered by the Livonian Order. Four years later, they split this territory between themselves and the Bishopric of Riga. In 1258, the Semigallians rebelled and managed to temporarily liberate themselves. In 1265, the Livonian Order began construction of Mintauja castle (Mithow, Mytowe). In 1272, Semigallia finally succumbed to the Livonian Order. In 1279, after the victory of the Lithuanians in the battle of Aizkraukle, the final Semigallian uprising started, led by Duke Nameisis. Nameisis acknowledged himself a vassal of Lithuanian Grand Duke Traidenis. In 1281, Nameisis, along with many of his compatriots, withdrew to Lithuania and, in the same year, took part in battles led by Traidenis against the Teutonic Order. In 1287, the battle of Garuoza was won by the Semigallians. Semigallia remained split between the Livonian Order and Lithuania. Lithuanian Grand Duke Gediminas titled himself Duke of Semigallia (Gedeminne Dei gratia Letphanorum Ruthenorumque rex, princeps et dux Semigallie) in letters to the Pope. The Semigallian language was spoken in the region until around the 16th century. Present Currently half of the former Semigallia is located in Latvia, half of it - in Lithuania. Within Latvia, Semigallia has the status of one of four historical and cultural regions of Latvia. The region takes its name from the Baltic people known as Semigallians. Since the 13th century, Selonia has been included as part of Semigallia, and comprises the eastern part of the current electoral district of Zemgale. It takes its name from the Selonian Baltic tribe. Traditional Selonia also includes a portion of northeastern Lithuania. Latvians generally consider Semigallia and Selonia to be one region, although sometimes Selonia is perceived as a separate fifth region. Also, on the coat of arms of Latvia, Semigallia is represented along with Courland (Kurzeme), due to the historical connection between the two regions. Semigallia borders other historical Baltic regions such as Vidzeme (the southern part of former Swedish Livonia) to the northeast, Lithuanian Samogitia to the south, Courland to the west and Latgale to the east as