More than 100,000 Indonesians have gathered for mass prayers at Jakarta's national mosque, where religious leaders urged them to back a Muslim candidate in a vote next week to select the capital's governor.

Organisers decided to hold Saturday's gathering at Istiqlal Mosque after police banned a planned street rally by those opposing incumbent Governor Basuki Tjahaja Purnama, who is accused of insulting the Quran.

An ethnic Chinese Christian popularly known as "Ahok", the governor is on trial for alleged blasphemy but remains a leading candidate in Wednesday's elections.

Ahok will come up against two Muslim contenders: Agus Harimurtri Yudhoyono and Anies Baswedan, in a contest analysts say has shaped as a proxy fight before a presidential election in 2019.

"On February 15, we are happy to vote for a Muslim leader," one speaker, Maulana Kamal Yusuf, told the crowd.

"Jakarta will be led by a Muslim leader who submits to the will of Allah," he added, urging voters to choose Yudhoyono or Baswedan.

"Jakarta will be a religious city."

By 06:00 GMT on Saturday, police officials estimated that more than 100,000 demonstrators had attended the gathering, with people overflowing from the mosque in the heart of Jakarta into the surrounding streets.

Al Jazeera's Step Vaessen, reporting from the demonstration, said people were streaming into the capital from across the country.

"The other two Muslim candidates were also seen at the mass prayer, despite a police warning that this ... should be non-political - but people are carrying a lot of political slogans here at the rally," she said.

"This election is not about Jakarta; it has become a national topic. It's about religion and it says a lot [about] Indonesia's ... future."

Jakarta's governor is accused of saying his opponents had used a verse from the Quran to deceive voters and prevent him from winning another term during a meeting with residents in the city.

Protests against him drew hundreds of thousands to Jakarta's streets in November and December and shook the government of President Joko "Jokowi" Widodo.

If none of the contenders gets more than 50 percent of votes, a run-off election between the top-polling candidates would be held in April.

Indonesia is the world's most populous Muslim nation, but recognises several faiths, and has a large Christian minority.