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, spread throughout northern Central Europe and the British Isles, 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 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. Lübeck was a leader in the German cities that gave rights to town citizens and overturned aristocratic privilege. Lubeck law is 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 that were derived from the Lübeck law at root.
Lübeck law was prevalent throughout cities in Northern and Northeastern Germany (Niederdeutschland) until 1900, when the modern German civil code (Bürgerliches Gesetzbuch) was implemented.
The Lübeck law provided that a city should be governed by a Rat (Council), having 20 Ratsherrn (council members). They were not elected by the citizens, but they would appoint a new member on their own from the city's merchant guilds. This was considered a key to representation of the guilds in the Rat of the city. The period of office was in principle 2 years, but the Rat could ask a Ratsherr to stay in office, which usually happened, so that the election was effectively for life.
The Rat elected up to four Bürgermeister (burgomaster, mayor) from its members, who shared the power of government. The "first burgomaster", usually the eldest of them, acted as a primus inter pares. These rules were in force up to the middle of the 19th century. The burgomasters stayed in office as long as they could. There are several examples from the Middle Ages in which burgomasters of Hanseatic League cities were sentenced to death for unsuccessful politics.
This model of a city government provided that only the most experienced, influential and personally most successful merchants - and a few lawyers, called Syndics - became members of the Rat. It was also a rule that a father and his son, or brothers, could never be members of the Rat at the same time, so that influential families could not get too large a share of influence on the city's politics.