Riga's connection with the Hanseatic League, or Hansa, can be traced back to the founding of the city itself in 1201, when merchants from German lands came through this territory with the aim of trading with Russia. At the beginning of the 13th century, northern German merchants and craftsmen began to settle in the city of Riga.
The new residents of the city maintained the same way of life, traditions and legal norms as in the German lands. Riga was established as a Western European-type city, and already in the 13th century the city of Lübeck supported Riga as one of its long-distance trading ports in the Baltic Sea region.
In the early days since the establishment of Riga (1225), Gotland city law (iura Gottlandiae) was adopted in the city, but already in 1270 Riga took over Hamburg city law, which was revised and supplemented in the 14th century by creating an original Riga law. These laws, in turn, were taken over by other cities in the Livonian region.
During the Hanseatic League period, Riga became a bridge between Western Europe and Russia. At that time, Riga's economic prosperity was made up of profits as an intermediary. Due to its advantageous geographic position as a transit city in the 12th century, Riga developed into an important and prosperous port city in Eastern Europe.
Already in the middle of the 14th century, the city of Riga issued a law in which Hanseatic and Russian merchants could conclude their mutual transactions only through local merchants in Riga. From 1376 onwards, arriving traders, including Hanseatic traders, were barred from retailing in the local market. At around 1460, trade with arriving traders in Riga was completely banned.
The importance of Riga as a port and trade city within Europe is also indicated in the city’s debt book, which shows the extensive geographical range of the city's trade relations. At the turn of the 13th/14th century, the Riga City Debt Book mentioned arrivals from 13 different European countries, from a total of 48 Western European cities.
From the port of Riga to the West, Russian goods were exported by Hanseatic ships - mainly wax and furs, and products of local farmers - flax, hemp and grain. In turn, salt, herring, metals, fabrics, wine and luxury goods were imported from the West to Riga, which were mainly intended for the eastern market.
During the existence of the Hanseatic League, it included about 200 cities. Although these cities did not belong to the association at the same time, the number of Hanseatic cities was still very impressive. Several regional groups were formed within the Hanseatic League: Saxony, Prussia, Sweden, Livonia, Westphalia, Rhineland and the Vendian. Regional meetings - the Städtetage - were also held within the regional groups.
Riga, as one of the most important cities in the region, took part in the main Hanseatic League meetings - Hansetage. Only representatives from the largest cities took part in these meeting. From the Livonian region they were: Riga, Reval (Tallinn) and Tartu. The other Hanseatic cities of the present territory of Latvia (Cēsis, Valmiera, Limbaži, Koknese, Kuldīga, Straupe and Ventspils) did not send their representatives to these meetings, as it was very expensive. However, these cities financially supported the Riga delegate, who also represented the interests of the smaller Livonian Hanseatic cities at the meetings. These meetings took place in Vendian cities, most often in Lübeck. The first main meeting of the Hanseatic League dates back to 1358. As the Hanseatic League is a voluntary association, attendance at meetings was not obligatory. Cities could also approve or reject the decisions adopted at the meetings, which were delivered to Riga by the city delegate. The last main Hanseatic League meeting took place in 1669.