The origins of the Hanseatic League date back to the 13th century when the German towns Hamburg and Lübeck concluded an agreement on trading in the Baltic Sea and the North Sea. The League evolved gradually to flourish in the 14th century and the first half of the 15th century, uniting dozens of towns in the Baltic and underlying regions. Among these were also eight towns of the present territory of Latvia: Riga, Cēsis, Valmiera, Koknese, Straupe, Limbaži, Kuldīga, and Ventspils. In the Middle Ages, the size of the town and the number of its inhabitants were factors of minor importance; it was the might and power of reigning aristocracy that made the territory attractive in the eyes of merchants and decided its public and military influence.
The aim of the Hanseatic League was to protect its members from raids of plunderers, robbers, and pirates as well as to curb the trade expansion of states and cities outside the League. The Hanseatic League had a special code laying down the common obligations of the member towns and controlling their economic relations.
Riga was a member of the Hanseatic League from 1282 until the final disintegration of the League. Trade that within the Hanseatic League took place between Western Europe and the lands of Eastern Slavs underpinned the wealth and might of Medieval Riga. Over time, Riga began to evolve as a major port of the Baltic Sea Region. The merging of sea and inland trade routes and the severe restrictions imposed by the Riga City Council on foreign merchants were an advantage.
"Riga is a house of hemp and butter." This is how Riga's contribution is lauded in a Hansa rhyme. Among the main goods exported from Riga were wax and furs, also flax and hemp. Imports were dominated by fabrics, salt and herring. The processing of transit goods precipitated the development of craftsmanship, while cross-cultural relationships found their expression in town planning and administration, sacral and secular arts, laws, social life, and the way of thinking.
The Hanseatic League was an attempt to achieve integration in Europe not only in mercantile but also cultural terms, and Riga as a Hansa city was a part of Christian Europe from as early as the 13th century. The legacy of the Hanseatic League – the Gothic church valves in Hansa cities, sculptures, paintings and objects of applied arts – enchants the citizens of united Europe in the 21st century as well.