Koknese () is a town in Aizkraukle Municipality in the Vidzeme region of Latvia, on the right bank of the Daugava River. It has a population of nearly 3,000. According to the provisions of the 2021 Latvian administrative reform, Koknese gained city rights (town status) on 1 July 2021. History The site of Koknese was originally a Latgalian and Selonian settlement named Kukenois. By the late 12th century, the settlement of Koknese had fallen under the loose sovereignty of Principality of Polotsk as a tributary sub-principality. At the beginning of the 13th century, the crusading Livonian Brothers of the Sword led by Bishop Albert of Buxhoeveden of Riga began to occupy the shores of the Gulf of Riga. By 1205 in return for protection against Lithuanians and Polotsk, the Eastern Orthodox Church prince Vyachko (Vetseka) of Koknese gave half of his land to Albert. By 1209 Koknese had been taken over by the Order, whereupon Albert ordered the construction of a stone castle where the Daugava meets the Pērse river to replace the wooden fortification of the Latvians. The formal sovereignty of Polotsk was finally revoked in 1215. The Order then controlled the town until its transference in 1238 to the bishops of Riga. The town became the summer residence of the Archbishop of Riga in 1420 and the primary residence in the 16th century. The castle was frequently a source of dispute between the bishops and the von Tiesenhausen family, which it had been granted to as a fief in 1269. They were supported by the Teutonic Order, as noble possession of the castle weakened the power of their rivals in the bishopric. The town, known in German as Kokenhusen, received its town privileges in 1277. During the 14th century, Koknese flourished as part of the mercantile Hanseatic League. Archbishop John V of Wallenrodt was able to resolve the conflict with the Teutonic Order and restore the territory to the church in 1397. During the Livonian War, Koknese was taken by Poland in 1561, which named the town Kokenhuza. Although Russian forces captured the town, it was recovered by Polish forces. During the 17th century Polish–Swedish wars, the town was repeatedly contested. It was the site of the Battle of Kokenhausen in 1601, in which the hussars of the Polish cavalry defeated their numerically greater Swedish adversaries. However, the town became part of the Dominions of Sweden in 1629