The signing of the Westphalian Treaties, in Münster and Osnabrück, in 1648 are deemed to mark the start of the modern concept of national sovereignty. In particular, Switzerland and the Netherlands became internationally recognized nations with no remaining ties with the Holy Roman Emperor. One country that seemed to evade a good definition of sovereignty, however, was the Holy Roman Empire itself, which had started as a pan-Western European state, but by then was reduced to a mostly German entity.
While a country on paper, the Empire was a patchwork of autonomous monarchies and free cities, some very large, some tiny. The emperor lived in Vienna and his own lands were in great part outside of the Empire. The monarch of Brandenburg called himself King of Prussia, based on his Baltic possessions, at a time when royal titles were strictly forbidden for German monarchs. Then, foreign powers owned substantial lands: Sweden in Pomerania, Denmark in Holstein, Spain in the Low Countries, and England would soon control Hannover. Add to that the hundreds of abbots and bishops who claimed sovereignty over their land, and the fact that deaths led to land partitions, marriages led to mergers, and the whole picture was one of great instability. It would take the intervention of Napoleon in the early 19th century to see the repartition of German lands between a handful of confederated nations.
German lands were unified as a single nation under the leadership of Prussia in 1871.