Attempts by India’s governing party, the BJP, to play up the country’s recent economic success and take credit for it backfired spectacularly. India’s rural poor, it emerged, did not buy the success – much less give anyone credit. So the BJP is out and the Congress Party in power. What next for India? (Part one of a two-part series.)

“…it was hard not to feel the strength of the hopes and desires of the people lining up to vote; hard not to see poignancy in the devotion they brought to their only and very limited intervention in the unknown outside world; hard not to be moved by the eagerness with which they embraced their chance to alter the world that wielded such arbitrary power over their lives.” – Indian journalist Pankaj Mishra, observing elections.

First reactions to India’s shocking election results were sharp and negative. The markets reeled – India’s benchmark Sensex fell by 16 percent, and foreign investors pulled a net $495 million out of the country’s stock markets.

But in reality, the elections demonstrated, powerfully, that the basic laws of Indian democracy, which have kept the country stable for decades, are still in force.

India has historically done a spectacularly poor job of delivering benefits to the poorest segments of society. Statistics on infant mortality are a revealing measure of this kind of basic distributional equity. It usually does not take much to keep a child alive – access to clean water, adequate nutrition, sanitation, basic medical care. Hence a high infant mortality rate indicates a profound breakdown in the most fundamental functions of government. On this measure, India – with 64 infant deaths per 1,000 live births – is in the company of barely-functional regimes such as Haiti (61), Yemen (71), and Zimbabwe (58).

Thus there are regions of India where government effectiveness breaks down; and segments of society which are simply abandoned by the system. It is from such abandoned people and state breakdowns that political violence frequently emerges. (Indeed, a mid-1990s study by the US Central Intelligence Agency found that the single best statistical predictor of a country’s level of political instability was the infant mortality rate.) And in India, the instability is there. Each year, India leads the world in the number of major riots and strikes reported. Hindu-Muslim riots claiming the lives of nearly a thousand people in Gujarat are a recent memory.

And yet, India is also stable, on a fundamental level. No revolutions, no coups, and over a half century of democracy. The reason is that the poorest members of society, those most likely to foment violent instability, buy into India’s political system. They believe in the power of the vote. A survey by India Today found that 59 percent of Indians said their vote makes a difference, against only 21 percent saying the opposite. Voter turnout at Indian elections handily exceeds that in the United States. And, unlike most democracies, it is the poorest Indians who vote most – low-caste untouchables have the highest rates of political participation.

So the BJP’s loss, while shocking, is profoundly stabilizing. It turns out the poor were right – their votes do make a difference. The BJP’s “India Shining” campaign, which played up the success of the country’s emerging middle class, only made the poor angry. But far better this anger emerge at the ballot box than in a violent revolution. That is democracy in action.

There was one more principle of Indian democracy shown to great effect at recent polls: stabilizing diversity.

The conventional wisdom has it that ethnic and religious divisions are fundamentally destabilizing. And there is some truth to this. Cross-country research by Paul Collier suggests that countries with a dominant ethnic group – 45 to 90 percent of the population – are disproportionately at risk of severe political violence. The majority ethnicity will often oppress the minority; the minority will sometimes take up arms to fight back. At first blush, majority-Hindu India seems to fall into this category.

But this overlooks the spectacular diversity of Indian society. As India scholars Lloyd and Susanne Rudolph have pointed out, India is divided along far more than simple ethnic lines. And these identities often overlap – a low-caste southern Hindu, for instance, might have more in common with a poor southern Muslim that with another Hindu from a different caste, a different region, who even speaks a different language. (India is home to at least 50, and possibly as many as 400 distinct languages.)

India is fragmented on so many levels – ethnicity, religion, tribe, language, caste, region – that appeals to ethnic chauvinism generally flounder. Especially at the national level. Collier’s research shows that such extremely diverse states – where no single social group has a majority – are less likely to experience violent instability. Not just compared to states with a dominant ethnic group, but even compared to states with only a single ethnic group. There is stability in diversity.

In India’s recent elections this diversity principle again held true. Attempts by the BJP to foment Hindu nationalism failed because poor, low-caste Hindus did not buy into it. In poor regions, voters rejected appeals to their religion and instead voted along economic lines. And thus the secular Congress Party won and the Hindu BJP lost even in Hindu areas. This was true, in fact, for Gujarat, site of recent Hindu-Muslim violence, where the BJP, despite its control of the state, lost six parliamentary seats, falling from 20 seats out of 26 to only 14.

To be sure, the BJP may react to this loss by promoting Hindu nationalism even more stridently. This may lead to further violence in some areas. But in doing so, the party will likely shoot itself in the foot – proving again that such strategies are bankrupt in diverse India. As a stable democracy, India shines still.

This article was originally published on Countryrisk.com, before I sold the website to Roubini Global Economics.