On Wednesday evening, hours after early counting revealed his electoral victory, the new governor of Jakarta, Anies Baswedan, celebrated his victory at Istiqlal, the Indonesian capital’s biggest mosque.

He was welcomed by Rizieq Shihab, the leader of the hard-line group Islamic Defenders’ Front (known by its Indonesian initials FPI). Also present were Bachtiar Nasir — a Muslim cleric who, along with Rizieq, organized a series of massive Muslim protests against Anies’ opponent, the incumbent governor — and Prabowo Subianto, chairman of Gerindra Party, which endorsed Anies’ candidacy.

Jakarta’s high-profile gubernatorial election is the most viciously fought in Indonesia, and seen as a stepping stone to national politics. (Indonesia’s current leader, President Joko “Jokowi” Widodo, is himself a former governor of Jakarta.) Anies won 58% of the vote according to early tallies (official results will be announced next week) and his victory is widely seen as a triumph for religious conservatism in Indonesia — momentously so. For although the country is the most populous Muslim nation in the world, political Islam has hardly made inroads until now.

A former Education Minister, Anies had been thought of as a religious moderate, but during campaigning he made unexpected overtures to hard-line Islamist groups that were using racist and Islamist rhetoric to stir up opposition to Anies’ ethnic Chinese, Christian rival, Basuki Tjahaja Purnama (popularly known as Ahok), and calling for him to be jailed for blaspheming Islam.

Ahok, Jakarta’s first Christian governor in half-century, had won praise for his no-nonsense approach in managing a sprawling city of 10 million that faces numerous, seemingly insurmountable infrastructural problems. He won the most votes in the first round of election, but it was always going to be an uphill battle after his criticism of Muslim hard-liners in a campaign speech backfired and landed him in court on blasphemy charges. (Ahok is attending a hearing Thursday during which the prosecutors ask for a one-year jail sentence with two years of probation, the Associated Press reports.)

On a visit to Jakarta on Thursday, U.S. Vice President Mike Pence praised Indonesia’s moderate Islam following a meeting with Jokowi. But there was nothing moderate about the leading players in Jakarta’s elections this year. They were distinguished by their religious bigotry and fundamentalism. Rizieq’s FPI thugs are notorious for raiding and vandalizing bars and night spots during Ramadan. Bachtiar has chaired a pro-family group of academics that is asking the Constitutional Court to criminalize adultery and sodomy. On Tuesday, a day before polling booths opened, Anies even compared the election to the Prophet Muhammad’s Battle of Badr. “At that time, the Prophet said, Allah’s assistance would come and the help would come if we battled to defend the poor, to defend the oppressed,” he said, perhaps referring to slum-clearance schemes initiated by Ahok.

“Anies’ victory is a victory of religious sentiment,” says Alissa Qotrunnada Munawaroh, daughter of late President Abdurrahman “Gus Dur” Wahid and founder of the Gusdurian Network, which advocates for democracy and diversity. “Conservative Islamic groups everywhere [in Indonesia] will surely learn from this experience. Politicians will also learn to use populism as well,” she tells TIME.

Pre-election polls showed that 76% of voters were actually satisfied with Ahok’s performance in running the city — but at the same time many Muslims were persuaded they should only vote for a Muslim leader. (Among them was the prominent Indonesian comic artist Ardian Syaf, who joined an anti-Ahok protest last December and later inserted Islamist references into the Marvel comic book X-Men Gold #1. Marvel has since fired Ardian.)

Read More: The Blasphemy Trial of Jakarta’s Governor Puts Indonesian Secularism in a Shockingly Poor Light

The coalescing of an Islamic vote is a surprisingly new development in a political scene that has always been dominated by secular parties. Indonesia’s Presidents have largely hailed from secular, nationalist parties (the exception was Gus Dur, a Muslim cleric whose commitment to diversity earned him the title “Father of Pluralism”). The main parties backing the candidates in the Jakarta election were also secular.

It is not uncommon for religious issues to factor into the electoral process in Indonesia, but they have never really been decisive. When Jokowi ran in the Jakarta gubernatorial election in 2012, with Ahok as his running mate, their opponents played the religious card against Ahok, telling Muslim voters it was haram (forbidden) to elect an “infidel.” The campaign didn’t work: Jokowi was elected governor, and when he became President in 2014, his deputy Ahok succeeded him as Jakarta’s top official.

But this time, religious campaigns were aggressively conducted on social media and through sermons at mosques. There was psychological intimidation of Muslim voters as well. A number of mosques in Jakarta erected banners stating that they would not perform funeral rites for any supporters of “the blasphemer.” Rape threats were made on Facebook against women who voted for Ahok, echoing the rapes that took place during the anti-Chinese riots in 1998 in Jakarta.

“The grassroots believes in this religious propaganda,” says Suratno, an anthropologist at Paramadina University in Jakarta who specializes in political Islam. “This is a failure of the pluralism that we have been proud of.” He chalks up Anies’ victory to the same kind of populist forces responsible for a Brexit Britain and a Trump White House.

Says Alissa: “A changing worldview, from inclusivity to religious exclusivity, has been going on for a while. In this election, it was amplified and became the most influential sentiment.”

It is clear that the success of political Islam in the Jakarta vote lies not in party politics but in a grassroots movement. There are worries that the tactics may be emulated in Indonesia’s presidential election two years from now, in which Jokowi is expected to run. He is seen as a clean politician but his commitment to tolerance and diversity make him a target for hard-liners. And the brutal treatment of Ahok also raises questions over whether a member of a minority can politically succeed in a country that has — as its increasingly ironic motto — Unity in Diversity.

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.