Running the world’s largest Muslim city is tricky. Especially when you’re Christian.

Running Jakarta is no job for the timid. The Indonesian capital’s traffic is hellish. Many officials are on the take. And much of the city’s population — nearly 30 million people if you count its environs — is fed up with government dysfunction.

But these challenges are compounded for Jakarta’s governor, a feisty civil servant nicknamed Ahok. As a minority, he must also contend with a toxic wave of racial and religious bitterness.

Most in Indonesia are Muslims. Their ancestral roots are firmly planted in the tropical archipelago. Not so for Ahok. The 50-year-old governor — full name: Basuki Tjahaja Purnama — is none of the above.

He is the grandson of a tin miner from mainland China. He’s also a Christian. In other words, he is a minority twice over.

That he has achieved so much political power is a testament to Indonesia’s dreams of equality — a goal, enshrined in the constitution, of a Muslim-majority country that accepts other faiths. The national motto is “Unity in diversity.”

But not all Indonesians share this dream.

Across the country, hardline Muslims have rallied to call for Ahok’s ouster. The largest gathering amassed an astounding 200,000 people. The crowds are stoked by Islamists who, from day one, have reviled the idea of a non-Muslim in Jakarta’s top post.

The governor’s supposed crime? Disrespecting the Quran.

In September, Ahok casually cited this Quranic passage: “Oh, you who have believed, do not take the Jews and Christians as allies.”

That verse had been misinterpreted, Ahok said, by political rivals hoping to whip up hostility toward non-Muslim politicians. “If you feel like you can’t vote for me because you’re going to hell,” he told voters, “then you’re being tricked.”

Islamists have extrapolated that verse to insist that Muslims should only vote for their own. But the passage refers to the seventh century when Muslims were religious upstarts hounded by enemies of various faiths — not to present-day Indonesia, where Muslims are socially and politically dominant.

But that won’t stop an influential vigilante group, the Islamic Defenders Front, from seizing a great opportunity. Even before Ahok was sworn in, they were protesting the governorship of a non-Muslim. Now they have succeeded in twisting a stray remark into a national scandal.

These vigilantes are best known for torching churches, raiding nightclubs, threatening porn stars and beating up drunks. Their leaders prefer Arab attire — white robes and skullcaps — over Indonesia’s traditionally vivid outfits.

As one of the group’s founders previously told PRI: “Society is diseased. Diseased with a social infection that violates sharia ... we fear for Indonesia’s future.”

Well, so do those who cling to a vision of a multicultural, tolerant Indonesia.

Ahok has plenty of Muslim supporters, particularly among Jakarta’s middle and upper classes. Their online show of support, #KamiAhok — which means “We’re with Ahok” — was briefly among the most-tweeted hashtags in the world. (Yes, Indonesians are really, really into Twitter.)

Ahok, technically a governor of Jakarta province, functions more like a mayor. He has never staked his reputation on identity politics. He prefers chasing non-ideological goals.

Ahok has gone after petty corruption and kickbacks. He has attempted, with dubious results, to lessen Jakarta’s insufferable traffic, among the worst in the world. He has helped clean up many of Jakarta’s rivers, which are often choked with filthy garbage.

Until the latest uproar, he had evaded big personal scandals. For the city’s hardliners, however, the emergence of a non-Muslim governor is scandal in its own right.

They don’t just resent Ahok’s Christianity. Many Indonesian chauvinists are also distrustful of those with Chinese blood.

Though only an estimated 1% to 2% of the population is ethnically Chinese, the group is seen as disproportionately wealthy. Repeatedly throughout Indonesia’s history, their neighborhoods have been attacked by mobs in times of political turmoil.

Though anti-Ahok rallies have subsided, his troubles have not. He has apologized for citing the Quran. But state prosecutors have decided that he must face blasphemy charges in court. The maximum sentence? Five years.

Much is at stake. Imprisoning one of the Indonesia’s best-known politicians — all over a non-malicious remark — will send a message to minority leaders: your background can be used against you.

Moreover, it signals even to Muslims seeking power that any misstep, including expressions of tolerance, will be scrutinized by hyper-sensitive hardliners in white robes.