CAMBRIDGE, England — THE cheerleaders of the European Union like to think of it as an entirely new phenomenon, born of the horrors of two world wars. But in fact it closely resembles a formation that many Europeans thought they had long since left to the dustbin of history: the Holy Roman Empire, the political commonwealth under which the Germans lived for many hundreds of years.

Some might take that as a compliment; after all, the empire lasted for almost a millennium. But they shouldn’t. If anything, today’s Europe still has to learn the lessons of the empire’s failures.

The similarities with the Holy Roman Empire — which at its greatest extent encompassed almost all of Central Europe — exist at many levels. Today’s European Council, at which the union’s member states gather, reminds one of the old Reichstag, where the representatives of the German cities and principalities met to deliberate matters of mutual concern.

And like the European project, which originated in a determination to banish war after 1945, the “modern” Holy Roman Empire, which was reformed by the 1648 Treaty of Westphalia, was intended to defuse the domestic German antagonisms that had culminated in the traumatic Thirty Years’ War.