The roots of the Imperial Principality of Liechtenstein reach back to the late Middle Ages. In 1342, the County of Vaduz came into being, and in 1379 its owners were granted important privileges of jurisdiction (freedom from foreign judges). From 1396 to 1719, imperial immediacy was confirmed more than 25 times by the emperors. From 1500, the sovereigns were recognized as imperial estates. Over some 300 years the dynasties changed five times. With the exception of the Princes of Liechtenstein, all of them were economically too weak to ensure continuity over a longer period of time. This was only possible for the Princes of Liechtenstein, who bought the domain of Schellenberg in 1699 and the County of Vaduz in 1712. Greater continuity and thus the centuries-long existence of the small but immediate county was made possible by the Holy Roman Empire, its laws and its institutions.