The Hanseatic League was a commercial and defensive confederation of merchant guilds and their market towns that dominated trade along the coast of Northern Europe. It stretched from the Baltic to the North Sea and inland during the Late Middle Ages and early modern period (c. 13th to 17th centuries).
The League was created to protect economic interests and diplomatic privileges in the cities and countries and along the trade routes the merchants visited. The Hanseatic cities had their own legal system and furnished their own armies for mutual protection and aid. Despite this, the organization was not a city-state, nor can it be called a confederation of city-states; only a very small number of the cities within the league enjoyed autonomy and liberties comparable to those of a free imperial city.