JAKARTA, Indonesia — Voters in Indonesia headed to the polls on Wednesday morning in the world’s largest direct presidential election, to decide who will lead the country for the next five years.
Prabowo Subianto, an ex-general and son-in-law of the former dictator Suharto, is seeking a win against President Joko Widodo, who defeated Mr. Prabowo in the last election, five years ago.
Mr. Joko, 57, who has emphasized infrastructure development while attempting to shore up support among traditional Muslims, holds a commanding lead in public opinion polls. He was the governor of Jakarta, the capital, before becoming president.
“If in fact Prabowo wins, it would be a major, major upset,” said Marcus Mietzner, a senior fellow at Australian National University and an expert on Indonesian politics.
This is Mr. Prabowo’s fourth try for the presidency, and some critics fear a victory could turn the clock back toward authoritarian rule.
As a lieutenant general during the Suharto era, which ended with the dictator’s ouster in 1998, Mr. Prabowo, 67, commanded the feared Special Forces and was later dismissed from the army for insubordination and the kidnapping of at least nine activists who opposed his father-in-law’s rule.
In this election, Mr. Prabowo sought support from hard-line Islamists who are eager to expand the role of Islam in daily life and favor measures such as requiring women and girls to wear hijabs in public.
To counter Mr. Prabowo’s appeal to such Muslims, Mr. Joko named a conservative cleric, Ma’ruf Amin, as his running mate and made a pilgrimage to Mecca this week to remind voters of his piety.
At a polling station in central Jakarta, Trianasari Arief, 44, said she was excited to vote for Mr. Joko and wanted to do her part to keep Mr. Prabowo from winning. She said the ex-general, known for his quick temper and unpredictable behavior, reminded her of President Trump and his upset victory in 2016.
“I don’t want what happened in the United States to happen in Indonesia — where people don’t go to vote and they get the orange-skin guy into office,” Ms. Trianasari said. “I have to vote.”
But it appeared that Mr. Prabowo’s anti-elitist message was winning favor among other voters. Sri Lestari, 42, a nanny in the affluent Menteng neighborhood, said Mr. Joko had not done enough to bring fairness to the judicial system, resolve human rights cases or unify the people.
“I want a leader who is firm and has high integrity, who is independent, not steered by other people and can make a decision on his own,” she said.
At a time when many Southeast Asian countries have become autocratic, Indonesia remains one of the most democratic.
About 190 million people are eligible to vote in an election that will employ six million temporary poll workers. To prevent undue influence, members of the military and the police — more than 800,000 people — are barred from voting.
The polls will close on Wednesday afternoon, and unofficial results could be announced by early evening.
If he loses, Mr. Prabowo is expected to challenge the legitimacy of the vote and claim that the results were tainted by irregularities, a charge he has made after previous defeats.
Although candidates were barred from campaigning as of Sunday, Mr. Prabowo held a news conference on Tuesday evening and predicted that he would win by a landslide.
“It’s all right for me to give a prediction, right?” he said. “I can reveal it, right? Sixty-three percent.”
Most independent polls have shown Mr. Joko leading by about 20 points.
Mr. Prabowo also claimed that the authorities in some areas had helped Mr. Joko’s campaign by arresting local officials who backed the former general’s ticket. He did not cite any specific locations where this had occurred, but he said there had been “many concerning cases.”
“We feel there have been many injustices and unfairness,” Mr. Prabowo said.