By the time it became clear to the world that Egypt's Arab Spring had gone terribly wrong, that the seemingly Hollywood-like drama of good-guy protesters triumphing over bad-guy dictator had turned out to be something much more disappointing, the other revolutions across the Middle East had soured as well.

Today, Egypt is under a new military dictatorship; Libya, Yemen, and Syria have all collapsed into civil wars.

In the years since everything went so wrong, it has become fashionable to blame the naiveté of the revolutionaries or the petty incompetence of transitional leaders. We are still trying to make this a story about the personal accomplishments or failures of individual heroes or villains, but that narrative is just as silly as it was when we first tried to apply in 2011.

The truth is that this was never a story primarily about individual heroes or villains. Rather, it was about something much bigger and more abstract: the catastrophic failure of institutions. It's not a story that is particularly dramatic, and it's not easy to profile for a magazine cover. But when you look at what has happened from the Arab Spring, from its 2011 beginning through today, you see institutional failure everywhere.

The real story of the Arab Spring wasn’t one about individual people being heroic or wicked

That story isn't as emotionally compelling as the one we told ourselves in 2011. But it's a crucially important one, if we want to understand how this went so wrong and the lessons for the world.

The story we tell ourselves about the Arab Spring

In the five years since the Arab Spring disappointed the world’s hopes, a story has developed for the revolutions and their failures.

On Egypt, for example, the story usually goes something like this: First, the brave and idealistic but tragically naive revolutionaries focused only on bringing down the evil dictator Hosni Mubarak, but not on governing when he was gone. They failed to plan or to politically organize, foolishly placing their faith in hope, change, and Facebook instead of doing the difficult work of real politics.

In that story, the liberals' supposed failures left an opening for the Muslim Brotherhood to sweep in and establish a hard-line Islamist government. The Brotherhood failed as well, pursuing shortsighted, petty agendas that alienated the public and elites alike. The military was able to exploit the liberals' naiveté and the Muslim Brotherhood's incompetence, taking power for itself and placing Egypt under a military dictatorship.

This narrative looks very different from the story we first told ourselves in 2011 about the Arab Spring, in which brave, enlightened protesters were said to be standing up to the evil dictators. But what these two narratives share is that they ascribe everything to the personal failings or strengths of certain individual people: a wicked dictator in the original 2011 story; naive protesters, shortsighted and oppressive Islamists, and an evil general in the 2016 version.

But both versions of the story are incomplete. Individual failures alone didn’t cause the disastrous consequences of the Arab Spring revolutions, just as the individual heroism of Arab Spring protesters wasn’t enough to ensure their success.

No matter how many times you topple the dictator, no matter how pure and good your protesters are, it won't be enough

The truth is that while the revolutionaries were in fact very brave and the dictators were in fact very bad, the real story of the Arab Spring wasn’t one about individual people being heroic or wicked. Rather, it was a less cinematic — but far more important — story about the dangers of brittle dictatorships and weak state institutions.

Democratic transition, it turns out, isn’t about whom you can overthrow or whom you replace them with. It's about whether or how you can change the vast network of institutions underneath that person.

If you don't make those institutions work — and often, by the dictator's deliberate design, you simply can't — then your revolution is doomed. No matter how many times you topple the dictator, no matter how pure and good your protesters are, it won't be enough. That's the real lesson of the Arab Spring — and it's important precisely because it's not as exciting or emotionally satisfying as the good-versus-evil story we prefer to tell.

The story of Egypt's Arab Spring we don't see: institutional collapse

In Egypt, Hosni Mubarak began preparing for revolution long before it came. In the three decades of his rule, he systematically ensured that no opposition party or civil society institution grew strong enough to challenge him. But in ensuring that no institutions were powerful or independent enough to threaten his rule, Mubarak also ensured that they were too weak to support a transition to democracy after he fell.

Mubarak stuffed the interior ministry with political loyalists rather than effective public servants, which allowed corruption and brutality to corrode public security. He turned the judiciary into a pro-regime puppet, which gave him a tool to persecute political opponents but left judges dependent and the rule of law weak. He undermined liberal opposition parties and tolerated the Islamist Muslim Brotherhood only enough to let him credibly claim to the world, "It’s me or the Islamists," using frequent crackdowns and careful electoral rules to ensure that they never got real governing experience.

The one institution that gathered strength was the military. Its role in politics expanded under Mubarak far beyond what his predecessor, Anwar Sadat, had permitted, with Mubarak using patronage to buy the military's loyalty as it grew more powerful.

But those measures couldn’t protect Mubarak forever. Even before the revolution, there were signs his regime was in trouble. His apparent plans to pass power to his son Gamal provoked popular outrage, including a 2010 protest at which demonstrators burned photographs of Gamal. Popular tolerance for the regime eroded further as inflation raised the cost of food, especially bread, placing real strain on poor Egyptians. Unemployment grew so catastrophically high that the International Monetary Fund warned it was a "ticking time bomb." Popular anger against police brutality grew.

When the protest movement finally exploded in January 2011, Mubarak's regime proved brittle. The revolution quickly gathered public support. The Interior Ministry failed to restore order.

And then, perhaps most crucially, Mubarak lost the loyalty of Egypt’s powerful army. Instead of crushing the protests, the army withdrew its support from his regime and installed itself in his place, ostensibly temporarily.

The real problem was never the degree to which individual protesters did or did not understand grassroots political organizing

But it turned out that the military, an institution itself, had become focused on preserving its own interests over those of the state, and, a mere year after the Muslim Brotherhood leader Mohammed Morsi became president, executed a military coup that deposed him and installed Gen. Abdel Fattah el-Sisi as president.

The Morsi government, in its year of rule between military regimes, did some things right and a great many things wrong. But at all times, regardless of its performance, it was beset and undermined by the weakness or total incapacity of institutions and civil society. The judiciary turned openly against the Morsi government, security services withdrew from the streets, and even the state institutions that provided gas and electricity failed, according to the New York Times, "so fundamentally that gas lines and rolling blackouts fed widespread anger and frustration."

Many of Morsi's failures were self-inflicted, but even if he had been better at governing, the hollowness of Egypt's state would still have at least severely weakened and possibly doomed him. And so when Morsi faltered, the country's democratic transition collapsed. The military filled the void left by the rest of the state's failures.

The problems that brought down Mubarak have never been fixed

The conditions that Mubarak deliberately engineered to elongate his rule — an excessively powerful military, a weak opposition without governing experience, corrupt security services, hollowed-out civil society, and no effective democratic institutions — have all remained after his fall, and have undermined successive governments as much as they eventually undermined his own.

When you see that, it becomes clear that the real problem was never the degree to which individual protesters did or did not understand grassroots political organizing. That democratic transition isn't merely the absence of a dictator. Rather, it is the presence of democratic rule.

And democratic rule requires something a lot more important, if less obviously visible, than having a good-guy democrat at the top of the government. It requires the institutions of democracy: political parties capable of winning elections, politicians capable of governing, a bureaucracy capable of implementing that governance, and civil society groups able to provide support and stability to those institutions.

Many of the liberal protesters had years of organizing experience, yet they couldn't seem to develop a political party to carry their ideals beyond Tahrir Square into actual governance. Maybe this was due in part to infighting, an inability to reach the working classes, or other failures. But it is also the case, perhaps most important of all, that Mubarak had systematically ensured, over the decades of his rule, that the conditions for developing a successful liberal political party simply did not exist.

The Muslim Brotherhood had fared a bit better — it had a genuine party machine, political candidates, and a base of public support — but as Morsi's disastrous administration showed, those are only necessary conditions for forming a viable party, not sufficient ones for governing.

Mubarak had ensured, over the decades of his autocratic rule, that basic institutions were weak or missing in Egypt. Yet when his regime fell, we were all shocked — shocked! — to discover that Morsi couldn't, in his 12 months in power, muster those institutions either.

The story of the Arab Spring is one of weak states imploding

A similar dynamic played out in most of the other Arab Spring countries — with even worse results.

In Libya, for instance, Muammar Qaddafi had gone to even greater lengths to weaken institutions such that none was strong enough to challenge him. It was, according to the International Crisis Group, "a regime centred on himself and his family; that played neighbourhoods and groups against one another; failed to develop genuine national institutions; and deliberately kept the national army weak to prevent the emergence of would-be challengers."

So when Qaddafi's regime fell, there was little left of the Libyan state. The country collapsed into conflict and today is mired in a civil war involving two rival governments and countless militant organizations, including ISIS.

In Syria, the military is strong and has largely remained loyal to Bashar al-Assad. But Assad had engineered the military not primarily as an external security force to guard the borders, but rather as an instrument of sectarian rule, staffing it with Alawites who would remain loyal to the regime. The result is that when Assad ordered the military to fire on unarmed protesters — orders that many militaries might have refused — some of the troops complied, while others defected to help begin an armed rebellion.

And so the Arab Spring protests in Syria have led to the worst of both worlds: the preservation of a brutal dictatorship that still holds substantial territory and attacks civilians, but also a power vacuum in territory that Assad lost, which has proved to be fertile ground for ISIS and other extremists. It has, of course, been a disaster for Syrian civilians.

Is Tunisia the exception that proves the rule?

There was one Arab Spring country whose institutions weren't hollowed out prior to its revolution: Tunisia. It turns out that it was the only country to emerge from the Arab Spring with anything approaching a real democracy.

Although there have been moments of serious crisis, including the murder of two liberal politicians in 2013, Tunisia has thus far stayed the course of its political transition. Its first post-revolutionary government remained quite stable throughout its term, and although it eventually lost public support, that resulted in a defeat at the ballot box in 2014's free and fair elections, rather than another revolution or coup.

Explaining the success of Tunisia's revolution necessarily involves some unseemly Monday morning quarterbacking. But Tunisia did have one advantage over its neighbors that seem to have made a crucial difference: Its civil society institutions were far, far stronger.

No one has ever written a ballad romanticizing the heroism of a lawyers association's participation in a series of meetings

That meant that when the country faced a political crisis following the 2013 assassinations, and when initial attempts to draft a new constitution broke down, there were other institutions within the country that were strong enough to prevent a descent into violence or state collapse.

Tunisia's largest trade union, its business organization, its lawyers association, and a leading human rights organization formed, in 2013, a "national dialogue quartet" that successfully brokered talks between rival political factions. Their ability to steer the political system toward consensus defused political tensions, supported the successful drafting of a new constitution, and paved the way for 2014's historic elections. In 2015, the quartet was awarded the Nobel Peace Prize in recognition of its work.

Tunisia's story is, yes, one of brave protesters and noble-minded individual Tunisian leaders, but it's also one of strong institutions and civil society that allowed those individuals to succeed.

That's not a particularly emotionally compelling story. As a former lawyer, I know all too well that no one has ever written a revolutionary ballad romanticizing the heroism of a lawyers association's participation in a series of meetings, and I suspect no one ever will. But without lawyers and trade unions and NGOs willing to step in to do the dull work of civil society, it's not clear that Tunisia would be the success story we consider it today.

Institutional weakness isn't as exciting a topic as evil dictators or heroic protesters — but it's far more important

The lesson to draw from this is not that it would have been "better" for Egypt to keep Mubarak, Libya to keep Qaddafi, or Syria to keep Assad. Rather, it's that by the time these countries got to the moment of choosing to keep or depose these leaders, the game was already lost. The governments were already so brittle and institutions so weakened that any outcome would be bad.

The lesson here is that although rigid autocracies often like to advertise themselves as a regrettable but necessary way to ensure stability, they're actually drivers of instability. They are only ever buying their regimes' temporary stability today by mortgaging their future security.

The primary question we should be asking after the failures of the Arab Spring is not whether more should have been done after 2011 to bolster transitional governments, or whether we should have chosen to simply preserve the dictatorships. The question we should be asking is why and how we allowed those dictatorships, over the decades before the 2011 revolutions came, to hollow out their states so completely that the Arab Spring was all but assured to bring chaos regardless of the world's response.

It was Qaddafi's brutal and ruthless regime that paved the way for Libya's eventual collapse into civil war, and Mubarak's shortcomings that left Egypt vulnerable to a coup by a mass-murdering general. And Bashar al-Assad is still proving every day that he was and remains the most terrible danger to the Syrian people, both in his own wholesale slaughter of innocent civilians and in his regime's catastrophic failures that opened up space for ISIS's own brutality and violence.

That's not the exciting, emotionally compelling message that anyone craves. Brave young protesters aren't going to take to the streets waving banners demanding judicial reform or civil society groups that can one day support a slow, incremental process of change. Hollywood isn't going to make any summer blockbusters about political negotiations that succeed because respected pillars of the community convince stakeholders to adopt a consensus-based approach. And political candidates aren't going to win applause with debate zingers about the importance of institutions to American foreign policy.

It's far easier to call for a dictator's downfall than to pressure for boring, unsexy policies that anticipate such a downfall years in the future and look for ways to ensure a smooth and uneventful transition.

But it's a story worth paying attention to. The Arab Spring nations aren't the only countries with brittle autocratic governments that could suddenly and catastrophically collapse. This is a problem we will face again.