Simon Denyer, The Post’s China bureau chief, has worked for most of the past decade as a journalist in India. He is the author of “Rogue Elephant: Harnessing the Power of India’s Unruly Democracy.”

On Friday, results are due from the world’s largest-ever exercise in democracy. They are expected to elevate one of India’s most controversial politicians to its highest executive office: making Narendra Modi prime minister, thereby giving power to a man whose hands carry the nation’s hopes of economic revival but also, according to his critics, the blood of 2,000 innocent people.

Modi sat on those hands in 2002, when Hindu mobs rampaged through the state of Gujarat for three days in an orgy of violence, rape, arson and murder largely directed against Muslims while, his critics allege, his police force looked on or abetted the killers. As the state’s chief minister, he continues to thrive on the prejudices of Gujarati Hindus toward the Muslim minority. How can India, a nation of breathtaking diversity, where people from countless different religions, castes, languages and classes have learned to live together largely in peace, be about to elect such a divisive figure?

The answer lies in the quiet trauma India suffered in the past decade, as the dreams of more than a billion people came crashing down. In 2004, it was on the crest of a wave, a superpower in the making, a nation talked about in the same breath as China, where the middle class flocked to gleaming shopping malls and the young flocked to jobs in IT — a nation that had begun to believe its own hype. Elections that year seemed to promise even greater glory, with the prime minister’s office occupied by the very man who, as finance minister, had set the ball rolling in 1991. Manmohan Singh, India’s most honest politician and its most economically qualified, was perfectly placed to help the nation deliver on its abundant promise.

Ten years later, China’s economy has gone from strength to strength, while India’s has sunk back into the ranks of the also-rans. Beijing wowed the world with the 2008 Olympics, while India’s 2010 Commonwealth Games seemed to confirm all the old stereotypes: dirty, corrupt and disorganized. Singh watched impotently as reforms stuttered to a halt, growth slowed and corruption gnawed at the nation’s heart. His strengths, his honesty and economic competence, became the mirror images of his government’s greatest failings. As if to drive the point home, half the nation was plunged into darkness in the summer of 2012 in the biggest power blackout in global history.

In 2004, India had been looking forward to a demographic dividend as hundreds of millions of young people entered the workforce; in 2014, it risks a demographic disaster, if those young people join the growing ranks of the unemployed and the underemployed.

But the past decade also saw a political revival in India, as youth rose up and demanded change. Hundreds of thousands took to the streets to rail against corruption; more protests erupted after the gang rape and murder of a young, middle-class woman in Delhi at the end of 2012. An explosion in 24-hour news television tore down the walls of deference that had sheltered politicians. A Right to Information Act gave the poor masses power to demand accountability from the nation’s vast bureaucracy. Even the traditionally apolitical middle class started to demand better governance. In contrast with the West, voter turnout in India is rising.

The likely beneficiary of this democratic awakening is, ironically, a man who seems to set little store in the checks and balances of democracy, a chest-thumping “strongman” who runs a state where dissent is suppressed and the media are cowed.

By voting for Modi, many Indians hope to end years of underachievement under desperately weak leadership. Under his rule, Gujarat’s economy has grown more than 10 percent a year and corruption has been kept in check. Poverty has fallen faster than the national average, electricity and clean drinking water are being delivered to villages and girls’ dropout rates from school have dropped. It may not be the miracle that some of his supporters pretend, but Modi’s economic achievements cannot be brushed aside.

Some Indians voted for Modi hoping that the realities of governing at the head of a coalition government, as leader of a nation and not just a state, will force him to keep his baser instincts in check. To woo them, Modi has attempted an image makeover, recasting himself as a man of humanity and compassion. While the makeover is unconvincing, there remains the possibility that Modi will bend to the realities of national politics.

To many liberal Indians, Modi represents an assault on their nation’s founding ideals. Yet to many young people, desperate for opportunities to match their vaulting aspirations, the riots of 2002 seem like the dim and distant past, while Modi’s emphasis on governance and development offers hope for a brighter future.