Hungarian Prime Minister Viktor Orban (Bernadett Szabo/Reuters)

Democracy is much more fragile than we thought.

That's a lesson a lot of post-communist Europe (and heck, the rest of the world, too) is learning right now, none more so than Hungary. Things are so bad there, in fact, that it probably doesn't even make sense for them to talk about this in the present tense anymore. Which is to say that Hungary's democracy is pretty much dead. Sure, it still has free elections, but not fair ones. Prime Minister Viktor Orban has rigged the rules in his favor to such an extent — everything from turning the state broadcaster into a propaganda outlet to changing how elections are decided so they're easier for him to win to even some eyebrow-raising vote totals in a few districts — that his Fidesz party was just able to capture the two-thirds supermajority it needed to rule unimpeded with only 48 percent of the vote.

At this point, Hungary might be best described as a dictocracy: a de facto one-party state where others are allowed to compete in elections only on such unequal terms that they basically have no chance of winning.

The scariest part, though, is how quickly all this has happened. It was just a decade ago, after all, that Hungary looked like an end-of-history success story. There had been the inevitable bumps along the way, but it had nonetheless managed to move from communism to free-market democracy better than most. Indeed, as Harvard's Yascha Mounk points out, it had hit all of the milestones — a GDP per capita of around $14,000 and a few peaceful transitions of power — that political scientists usually say are signs that a democracy is safe from backsliding.

So why wasn't it? Well, part of the reason was what turned out to be a bad economy, and the rest was worse luck. The first half of this was that Hungary's growth had been a bit unbalanced. It wasn't just that the rich were doing a lot better than the poor but also that the cities — Budapest, really — had been doing a lot better than the countryside as well. It meant that, like a lot of other places, Hungary, as Princeton professor Kim Lane Scheppele told me, was “really two different countries.” There were the liberal urban areas that were getting even further ahead and the conservative rural ones that, yes, were falling even further behind.

That wasn't a problem as long as everyone could go into debt to cover this up, but that stopped in 2008. That's when their house of cards — or rather, Swiss francs — came crashing down. During the boom, you see, almost everyone in Hungary had been taking out mortgages and car loans in foreign currencies that charged lower interest rates than their own. What they didn't pay much attention to, though, is that they were getting the certainty of lower debt payments today for the possibility of much, much larger ones tomorrow if the Hungarian forints they were being paid in ever fell against the euros and Swiss francs they had borrowed in — which, of course, is exactly what happened during the financial crisis. The result, Scheppele said, was that “suddenly the entire middle class was underwater” right when the government couldn't afford to do anything about it because it needed to be bailed out itself.

It's the least surprising thing in the world, then, that Hungary's voters decided to get rid of the government — in this case, the Socialists — who had gotten them into this mess in the first place. That's how democracy is supposed to work. But what none of them understood was just how dangerous Orban, who by this point was the last man standing in Hungarian politics, really was.

The only way they might have is if Hungary's other conservative parties hadn't already imploded. Now, there are two things to understand here. The first is that Fidesz, which has always been just a vehicle for Orban's ambitions, was only one of many right-of-center parties during the country's first foray into multiparty democracy during the 1990s, and not even the most prominent among them. But all the others soon withered away under the glare of various corruption scandals so that, as early as 2002, Fidesz had won this ideological contest by default.

The second, as Harvard professor Daniel Ziblatt has shown, is that democratic breakdowns are often preceded by conservative ones. That's because the absence of a strong party on the right makes it easier for anti-system politicians — those who evince little interest in democratic niceties such as minority rights, the rule of law or even elections themselves — to either take over the system for their own purposes or elbow it aside.

Hungary's bad luck is that Fidesz was being counted on to play this gatekeeper role when it should have been the party being kept out. And if there'd been better leadership in the other conservative parties, it might have been. Orban's opponents, Scheppele wrote, “had been warning for more than a decade that he had autocratic tendencies” right before he swept into office in 2010 simply because of the fact that his party was the only major one left that hadn't self-immolated because of double-dealing or failed leadership. Voters didn't know his true intentions — he spoke in the usual cliches — but elites had an idea. They just couldn't come close to stopping him.

The point, Scheppele said, is that it's not as if Hungary's people thought they were “voting to annihilate democracy.” Fidesz looked like a normal party that was making normal promises.

That didn't last long, though. As soon as it came into office, it set about the task of consolidating power. It turned the country's courts into a rubber stamp, bullied the independent media to the point that it barely exists anymore, funneled money to jingoistic nongovernmental organizations at the same time that it cut off critical ones, enriched the regime's friends with no-bid contracts and rewrote the electoral rules to benefit itself at the expense of the opposition.

And that was before things got really bad. Orban's government has now gone so far, the New York Times's Patrick Kingsley reports, as to demonize refugees in eighth-grade textbooks by saying that it “can be problematic for different cultures to coexist.” And, as my colleague James McAuley describes, it's made George Soros — the Hungarian-born financier who funds pro-democracy groups around the world, and, yes, happens to be Jewish — the target of what is now its openly anti-Semitic propaganda. “We are fighting an enemy that is different than us,” Orban said, “not open, but hiding; not straightforward, but crafty; not honest, but base; does not believe in working, but speculates with money; does not have his homeland, but feels it owns the whole world.”

Their new slogan is “Hungary First.”

Hungary, in other words, is not fascist, but it's not not fascist either. It's somewhere in between, in a place we don't have a good word for yet but will need soon if things keep going this way.

And that's the bigger point: This isn't just a Hungarian problem but a worldwide one.

Most countries have had at least one of their mainstream parties become discredited by the Great Recession. They've also seen the gap between their urban haves and rural have-nots widen the past few decades, polarizing electorates between people who like things the way they are and ones who want to blow it all up.

Just as important, though, is that immigration (or sometimes just the specter of it) is making a lot of these left-behind whites worry in the most xenophobic terms possible about losing control of their countries to a cabal of shadowy elites and brown-skinned people. Put it all together, and it's making politics less about the traditional left-right divide and more about the emerging cosmopolitan-nationalist one, which leads to even more bitter fights because those about identity are more intractable than the ones about ideology.

Worst of all, this encourages an apocalyptic mode of thinking — if you don't win now, the country you love will be gone forever — that justifies any and all tactics, no matter how undemocratic. It's why researchers have found that Orban's supporters aren't troubled by his dictatorial turn. He's doing what he needs to.

Funny how putting your country first usually means putting your democracy last.