The European Union is in serious trouble. A series of recent challenges have shown the flaws in the design of the union.

Like the structural flaws that caused the fall of Edgar Allan Poe’s “House of Usher,” the structural flaws of the EU could bring a similar fate. In Poe’s story, it was a minor zigzag crack in an aging wall that eventually widens into the full and final collapse of the house of Usher.

Some fissures in the EU are already more visible. Quite a few of these flaws are the product of an elite dream of an ever closer union racing ahead of political and economic realities.

In last week’s fiercely contested watershed referendum, the British voters chose for their country to leave the EU and forge ahead on its own.

A sense of frustration also prevails beyond the U.K. Voters in Europe say they are frustrated by many EU regulations and the EU’s inability to control an immigration crisis, and embrace a sense of resurgent nationalism.

All of this frustration is the predictable price for elites disregarding the reality that a truly European identity will take years to build. While the dream of one Europe survives, the EU’s elites have been too impatient in pressing for it.

In particular, the eurozone was premature. The EU experience with an earlier attempt to stabilize currencies was a failure and a warning that the European economies were not ready for a rigid union; in economists’ terms the EU was not an optimum currency area.

The EU will have to allow greater adjustment inside the union.

Greater flexibility would have allowed the EU to make greater concessions to individual members, perhaps granting Prime Minister David Cameron more leeway on immigration.

It is not easy to secure agreement from so many members, but that too has to change. The EU needs to move rapidly to control its borders and expand efforts to settle migrants in or near their home country.

Like the structural flaws that caused the fall of Edgar Allan Poe’s “House of Usher,” the structural flaws of the EU could bring a similar fate.

In the longer run, Europe must be able to develop the fiscal, financial and even foreign policy tools it needs.

It is all too easy to criticize the EU for having potentially fatal flaws. But the 75-year effort to build pan-European institutions has had major successes.

Look back 75 years before the end of World War II and you can see three European civil wars: the Franco-Prussian War (1870-1871), World War I (1914-1918) and World War II (1939-1945). The last two engulfed the entire world. Looking forward 75 years from that same date (1945) and there is a record of peace and prosperity. The Europeans should continue to build their shared future.

America should not be a simple observer. From the Marshall Plan to the formation of the European Union, the United States has supported a politically and economically unified Europe. America needs to stay actively engaged with that project.

Meanwhile, we Americans should not get carried away. Evidently, the American City on a Hill, which is meant to be an example for all nations, needs some serious repairs.

Like Europe, the U.S. is struggling with growing inequality, stagnant wages and persistent unemployment for specific groups and regions.

Indeed, Europe offers some useful lessons that the U.S. should explore. Denmark, for example, has combined a comprehensive safety net with a flexible labor market to create what it terms “flexicurity.”

And Germany and some other European countries have successful training systems for labor that support individual and national prosperity.

Perhaps most importantly, we should resist the impulse — quite prominent among our country’s own elites — to belittle the positive power of the example of other countries as somehow irrelevant to the American experience.

The opinions expressed here are solely those of the author.

This article originally appeared in The Japan Times