The Lübeck law (German: Lübisches (Stadt)Recht) was the constitution of a municipal form of government developed at Lübeck, now in Schleswig-Holstein, after it was made a free city in 1226. The law provides for self-government. It replaced the personal rule of tribal monarchs descending from ancient times or the rule of the regional dukes and kings that had been established by Charlemagne. The latter held all of his aristocratic vassals personally responsible for the defence, health and welfare of the tribesmen settled on their estates, including the towns. The Lübeck Law in theory made the cities to which it applied independent of royalty.
Lübeck set about spreading its form of government to other cities around the Baltic Sea. Eventually about 100 adopted a government based on the law. It still serves as a foundation for German town laws in many of those cities. Later in the 13th century, cities predominantly governed by the Lübeck Law formed into a powerful trade association, the Hanseatic League, which amounted to a quasi-confederacy with headquarters at Lübeck. However, by the 15th century, major kontore and smaller trading posts of the Hanse, which was then at the high-point of its influence, would spread throughout northern Central Europe from London to Veliky Novgorod and from Trondheim to Frankfurt, dominating trade far beyond German-speaking regions and also far beyond the cities where Lübeck law actually was in force.
An official Lübeck law transcript was never available or used until the revised edition of 1586 was printed by printer Johann Balhorn, but rather Lübeck was a leader in German cities giving rights to town citizens and overturning aristocratic privilege. This was the basis for the Dortmund code in Westphalia, the Goslar code in Saxony and the Magdeburg rights in East-Central and East European towns. References to 'German Law' in the Middle Ages mean laws sprung from the Lübeck law at root.