Indonesia, the world's third-largest democracy and biggest Muslim-majority country, goes to the polls in April.

The contest, at least in terms of the presidential candidates, is shaping up as a repeat of the 2014 election, when political outsider Widodo defeated Prabowo, who has deep ties to Indonesia's business and military elite.

Widodo is a popular moderate who has had mixed success with his reform agenda. Prabowo is a charismatic nationalist with strong links to Islamists who frequently rails against foreigners.

On a dramatic day of political maneuvering and intrigue, Widodo made a surprise decision to pick Amin, just hours after former chief justice Mahfud MD appeared to confirm he was the vice presidential choice of Widodo.

Amin is the influential head of the Indonesian Ulema Council (MUI), who issued a statement condemning Widodo's political ally, the ethnic Chinese Christian former Jakarta governor Basuki Tjahaja Purnama, as a blasphemer for insulting the Koran in the middle of a heated Jakarta election campaign.

Prabowo's candidate for Jakarta governor won the election, which analysts and rights advocates condemned for inflaming sectarian sentiment.

Amin had been a presidential adviser and had served in local and national legislatures in the past.

"Maybe there are questions from the people all over Indonesia why Professor Dr. Ma'ruf Amin was chosen. Because he is a wise religious figure," said Widodo.

"I think we complete each other, nationalistic and religious."

But Human Rights Watch researcher Andreas Harsono told Reuters Amin, as head of the MUI, had overseen a rise in religious intolerance across Indonesia, a pluralist country with significant minority communities.

"He issued fatwas condemning religious and gender minorities like the Ahmadiyah and LGBT individuals at a time they were subject to violent assaults," he said.

DIVISIONS

"He also oversaw the creation of so-called religious harmony forums across the country. These forums replaced the principle of religious freedom, stoked divisions and favored the majority Sunni Muslim community."

Prabowo said his candidacy was supported by three political parties, but left out the Democrat Party in his nomination speech in an apparent sign of rifts in the opposition coalition.

"It is not easy to build a coalition because many things have to be brought together," Prabowo said.

The Democrat Party views the choice of Uno as a betrayal. Just last week, chairman of the party, former president Susilo Bambang Yudhoyono, and Prabowo's Gerindra party announced an alliance.

Agus Yudhoyono, a 39-year-old retired soldier and the ex-president's son, was expected to be the vice presidential candidate after the deal.

An hour before Prabowo's near-midnight announcement, the Democrat party threatened to quit the coalition unless Prabowo went with the younger Yudhoyono or reconsidered his pick for running mate, party secretary general Andi Arief said on his Twitter account.

Arief had earlier tweeted a stream of derogatory comments about Prabowo.

Former investment banker Uno said he would work with Prabowo "to present a strong government ... build the economy and stabilize food prices".

Uno played a pivotal role plotting the campaign to oust then incumbent governor Purnama. After the victory, Uno said it was regrettable race and religion had dominated the campaign.

Gerindra's deputy chairman Arief Poyuono said the Prabowo-Uno team would mean the opposition had candidates from both Java and outside Indonesia's most populous island. Uno has roots in Gorontalo in Sulawesi.

Many Indonesians from outside Java resent Java's political and economic dominance.