Many mainstream parties in Europe shy away from facing the reality of popular unhappiness over these failures. Their leaders, who reflexively sympathize with the EU idea, are reluctant to face its shortcomings. This leads voters to seek other options.

The EU’s second great failure, which feeds the first, is its policy of imposing harsh sanctions on member states that are perceived to have misbehaved. Greece’s experience shows how badly this policy can end. Throwing huge numbers of people out of work and drastically cutting public services is a recipe for social unrest — especially if, as in Greece, people are given little hope that there will ever be an end to their pain or a reward for their sacrifice. For years, ordinary Greeks watched the wealthy and politically connected remain comfortable while much of the country screamed in pain. The recent election result was their response.

The rise of these formerly marginal movements reflects two powerful failures by the European Union, both of which have set off widespread anger. First is the EU’s reluctance to control borders and immigration. Peoples accustomed to a certain self-image are finding that image challenged in disorienting ways by what seem to be waves of immigration. This immigration, legal and illegal, is likely to increase in coming years as a result of surging instability in the Middle East. That will intensify social tensions that are already explosive in some places.

Greece is not the only country clamoring for profound change in the way Europe does business. A leftist party, Podemos, is gaining strength in Spain. In France it is the right wing, led by Marine Le Pen, that rides the anti-EU bandwagon. All three main opposition parties in Italy want to pull their country out of the eurozone. British politics is being shaken by the rise of groups that want Britain to quit the EU.

For decades this process seemed to be advancing. Over the course of half a century, countries in what is now the EU ceded more of their national sovereignty than any group of countries has voluntarily ceded in all of modern history. Now that process has not only stopped; it has reversed course.

This political divisiveness is the opposite of what statesmen who launched the European project imagined in the 1950s. They preached the doctrine of ever closer union. European countries would recognize their common interests, they imagined, and nationalism would fade away. Some even dreamed that one day boundaries would dissolve and Europe would become a federal state.

Their nonchalance is misplaced. The Greek elections are an important harbinger of the Europe that lies ahead. It will be a continent of escalating tension and conflict.

When the rebellious leftist party Syriza won Greece’s Jan. 25 elections on a platform of repudiating agreements with the European Union, mainstream leaders in the rest of Europe were unhappy but not alarmed. Most considered it simply a bizarre misstep by an immature population.

Today’s wave of new challenges in Europe reflects fundamental flaws in the EU. One is its elitist nature. Since its inception, the EU has been a top-down project. Masses of ordinary Europeans never demanded a supranational regime. Politicians and visionaries stunned by the horrors of World War II decided it was a good idea. They imposed it with the assumption that the masses would thank them in the end.

A second problem has been the EU’s promiscuity in accepting new members. Greece is just one example of a country that was taken in despite the clear fact that it was politically and economically unready. Other states, like Bulgaria and Romania, were also admitted even though EU leaders knew they were corrupt and institutionally weak. They acted for cultural reasons. All countries that could claim to be culturally European were welcomed into the EU, despite their internal problems. Once they joined, the EU elite turned a blind eye to their failures, presuming that pumping money into their economies would keep them going until they reached the standards they were supposed to have reached before joining.

The EU’s system of requiring unanimity for all major decisions has allowed small states to extort outrageous privileges. Never has the EU considered adopting a mechanism to expel states for chronic bad behavior. Every member is considered permanent, so there is no real incentive to obey rules.

The deepest flaw in the EU concept was the fantasy that Europeans would steadily become less nationalistic. Europe is the original home of nationalism. For centuries, nationalism has been the dominant factor in European politics. Utopians may wish it would evaporate. Today it is resurgent.

When the Cold War ended, the great ideological conflict that had shaped the previous half-century evaporated. It was tempting to believe this would mark the end of all strife in Europe. But the end of the Cold War meant only that older, deeper conflicts — buried for decades but still burning intensely beneath the surface — would re-emerge. In many countries these conflicts were forgotten because people were prosperous and felt no need to protest. As prosperity fades, though, old impulses begin to surface. Habits ingrained into national psyches over centuries cannot be dissolved by a few decades of decrees from on high.

For several centuries Europe dominated the world. It still plays an outsize role economically and culturally, as the pre-eminent symbol of Enlightenment values. Yet this role cannot be considered permanent. The rise of other countries and regions need not threaten Europe, but the continent’s identity crisis does. Its leading institutions seem unable to deal deftly with populations that are reverting to old habits. That is ominous because no other force exists to maintain European stability.

Historical antagonisms within Europe are already starting to strain the EU and NATO. Some countries are markedly more sympathetic to Russia than others. This brings old rivalries to the surface. They will not lead to open conflict anytime soon, but long-term peace is not certain anywhere on earth, including Europe.

Twenty years ago Serbia, Bosnia and Croatia were at war. Fifteen years ago it was Kosovo’s turn. In 2008, Russia and Georgia fought. Now a low-level war is underway in Ukraine. None of these conflicts have involved EU members, and membership will undoubtedly continue to be a deterrent to open conflict. A millennium of history, however, suggests that even this deterrent may not be permanent.

The last few centuries have been kind to Europe. This has brought great benefit to the world, in the form of European art, culture and science, as well as great harm, in the form of oppressive colonialism. Today Europe, for all its flaws, represents some of the best of what humanity has to offer. Yet it faces grave challenges. Dealing with an obstreperous government in Athens is the least of them.