JAKARTA -- Indonesians have voted for the president of the world's most populous Muslim majority nation, choosing between a second term for President Joko "Jokowi" Widodo or longtime rival Prabowo Subianto, a former military general.
Voting at more than 800,000 polling stations across the sprawling archipelago closed at 1 p.m. local time. Unofficial preliminary counts will start coming in from around 3 p.m., with the winner becoming clearer later in the day. The General Elections Commission could take up to a month to announce the official final results.
There are about 193 million registered voters in Indonesia, making this the world's largest direct presidential election -- meaning one person, one vote. In comparison, the U.S., which had about 158 million registered voters for its 2016 election, chooses presidents indirectly through a body known as the Electoral College.
Past surveys showed Widodo, a former furniture maker and the country's first president from outside the ruling elite, cruising to a comfortable win. About 50% of respondents had favored him compared with 30% for Subianto, former son-in-law of the late dictator Suharto.
But the gap has narrowed in recent months.
Analysts expect a close race and have not ruled out an upset. Low-income and older voters are backing Widodo, who has a slight edge with the key millennial constituency. Subianto is faring better among first-time voters and those more highly educated.
Subianto cast his ballot early Wednesday in Bogor, south of Jakarta. Speaking to reporters he said he was optimistic of victory, predicting he would win a 63% share of the national vote.
The former general promised to bring down food and electricity prices in his first 100 days. After that he said he would "start protecting our resources, stop the corruption, stop the corruption, and stop the corruption."
Widodo voted later in Jakarta with his wife, Iriana.
"We are always optimistic of our work... the results of the election," the president told reporters. He also posted an image on his Instagram account saying "the future of this country lies in your hands."
While the past three presidential elections have seen increasing numbers of voters staying away from the polls, Wednesday's turnout is forecast to be around 70%.
The government gave the country the day off to vote, a move which might tempt some to go on vacation instead, as a long weekend follows the election. To counter this, more than 250 companies are offering one-day discounts to people who cast their ballot.
Other elections for national, provincial, municipal and regency legislatures are also being held today. More than 245,000 candidates from 20 political parties are vying for some 20,000 seats nationwide, according to the Lowy Institute.
In the race for the House of Representatives -- the nation's lower house of parliament where bills are proposed and passed -- only parties that garner 4% of the national vote can be represented. Widodo will need to form a coalition to run the country relatively unimpeded should he win another term.
The elections will decide the direction of Southeast Asia's largest economy. Widodo has said that if he wins his second -- and final -- term, he will continue his signature infrastructure development, but with more focus on human resources. Subianto, a staunch critic of Widodo's liberal, technocratic approach to the economy, which he blames for the country's rising debt, is preaching economic nationalism, including plans to limit imports.
Both candidates have pledged allegiance to Pancasila, the secular and pluralistic foundation of the country. But with identity politics on the rise since the two vied for the presidency in 2014, each camp has been courting the growing number of conservative Muslim voters.
Widodo has reached out to Nahdlatul Ulama, Indonesia's largest Muslim group that favors the country's moderate, homegrown version of Islam, choosing the group's senior cleric Ma'ruf Amin as his running mate.
Meanwhile, Subianto has mobilized support from stricter Islamist groups. His young billionaire running mate, Sandiaga Uno, is being marketed as acceptably devout by the groups to serve as their representative.
Observers are worried that a close win for either candidate will be disputed, as happened in 2014 when Subianto challenged Widodo's six-percentage point victory. Another challenge could be on the horizon, especially if Widodo wins by a narrow margin. The opposition is already claiming vote fraud and accusing election commission officials of bias.
Markets favor a Widodo win as it would mean more continuity and less uncertainty. Investors have also grown anxious over the past few weeks about a narrow victory, or possible upset win by Subianto.
Voters on Wednesday gave various reasons for their choice of president.
Siti Marliana, 27, a worker at a district office in Bogor said she voted for Subianto.
"I voted for Prabowo because personally I admire his firmness. That's what Indonesia needs now," I'm quite dissatisfied with incumbent candidate because he let too many bad things happen including corruption in one of his supporter's parties."
Novia, a 34-year-old office worker who voted in Bekasi, West Java, said she was looking for continuity under Widodo.
"I want him to continue with his programs," Novia said, adding that includes the Widodo's 2014 pledge to settle past human rights abuse cases. "He hasn't been able to do that, so hopefully he will in second term."
She added that she liked Sandiaga Uno, the younger billionaire running mate of Subianto.
"He's good looking, and he's good at public speaking," Novia said. "But he's running with Prabowo. And I think [Indonesia] would go backward under Prabowo -- he was part of [former dictator Suharto's] New Order."
Nikkei staff writers Bobby Nugroho and Ismi Damayanti in Jakarta contributed to this story.