Residents of Riga and Grand Duchy of Lithuania defeated the Livonian Order in the Battle of Turaida.

The Battle of Turaida or Treiden (also known as the Battle on Aa) was fought on June 1, 1298, on the banks of the Gauja River (German: Livlndische Aa) near the Turaida Castle (Treiden). The Livonian Order was decisively defeated by the residents of Riga allied with the Grand Duchy of Lithuania under command of Vytenis.

In 1296 a civil war broke out in Terra Mariana between burghers of Riga and the Livonian Order. Johannes III von Schwerin, Archbishop of Riga, unsuccessfully attempted to mediate the dispute. As the conflict grew, Johannes III joined the cause of the Riga residents, but was defeated and taken prisoner. In March 1298, Riga concluded an alliance with pagan Grand Duchy of Lithuania, which was a subject of a Catholic crusade by the Teutonic Knights and Livonian Order.

The Lithuanians, commanded by Grand Duke Vytenis, invaded Livonia and besieged Karkhus (Karksi). Once the castle fell, the Lithuanians looted, massacred, and took many prisoners. The defensive Livonian forces engaged the Lithuanians on the Gauja River. At first it seemed that the knights were winning the battle, but Vytenis vigorously counterattacked with reinforcements from the Archbishop and dealt a decisive defeat. Livonian Grand Master Bruno and komtur of Fellin were killed. According to different sources, either 60 or 2022 noble knights were killed in the battle. If indeed it was 60, then the battle would be comparable to the Battle of Saule in terms of casualties. If about 20 knights were killed, it would still be in the top 10 defeats suffered by the Teutonic and Livonian forces in the 13th century.On June 28, the Livonian Order received reinforcements from the Teutonic Knights and defeated residents of Riga and Lithuanians near Neuermhlen. According to inflated numbers reported by Peter von Dusburg, some 4,000 Rigans and Lithuanians died at Neuermhlen. The knights proceeded to besiege and capture Riga. After Eric VI of Denmark threatened to invade Livonia to assist Archbishop Johannes III, a truce was reached and the conflict was mediated by Pope Boniface VII. However, the conflict was not resolved and the alliance between Lithuania and Riga continued for another fifteen years.

Riga (; Latvian: Rīga [ˈriːɡa] (listen), Livonian: Rīgõ, Russian: Рига) is the capital of Latvia and is home to 614,618 inhabitants (2021), which is a third of Latvia's population. Being significantly larger than other cities of Latvia, Riga is the country's primate city. It is also the largest city in the three Baltic states and is home to one tenth of the three Baltic states' combined population. The city lies on the Gulf of Riga at the mouth of the Daugava river where it meets the Baltic Sea. Riga's territory covers 307.17 km2 (118.60 sq mi) and lies 1–10 m (3 ft 3 in – 32 ft 10 in) above sea level, on a flat and sandy plain.Riga was founded in 1201 and is a former Hanseatic League member. Riga's historical centre is a UNESCO World Heritage Site, noted for its Art Nouveau/Jugendstil architecture and 19th century wooden architecture. Riga was the European Capital of Culture in 2014, along with Umeå in Sweden. Riga hosted the 2006 NATO Summit, the Eurovision Song Contest 2003, the 2006 IIHF Men's World Ice Hockey Championships, 2013 World Women's Curling Championship and the 2021 IIHF World Championship. It is home to the European Union's office of European Regulators for Electronic Communications (BEREC). In 2017, it was named the European Region of Gastronomy.

In 2016, Riga received over 1.4 million visitors. The city is served by Riga International Airport, the largest and busiest airport in the Baltic states. Riga is a member of Eurocities, the Union of the Baltic Cities (UBC) and Union of Capitals of the European Union (UCEU).