MEDAN, Indonesia — President Joko Widodo of Indonesia has succeeded in his bid for re-election, according to a full vote count released by the country’s election commission on Tuesday, in a repudiation of the nationalist and faith politics that have brought strongmen to power across the globe.
Mr. Joko captured 55.5 percent of the vote, well ahead of Prabowo Subianto, a former army general whose alliance with hard-line Islamists raised concerns in the country with the world’s largest Muslim population. The results came more than a month after the April 17 vote.
A moderate technocrat with an enthusiasm for infrastructure projects and a reputation for celebrating Indonesia’s religious and ethnic diversity, Mr. Joko, 57, was accused by supporters of Mr. Prabowo of being a secret Christian who was selling the country to foreign investors.
But Mr. Prabowo’s divisive vision of the country did not prevail. A four-time presidential candidate, he won 44.5 percent of the vote, worse than he did in 2014, when he first ran against Mr. Joko, who is known by the nickname Jokowi.
Mr. Joko’s strongest showing came in areas of the country with large populations of religious minority groups, like the tourist island Bali, which is majority Hindu, and Papua, a province with a large population of Christians and animists.
“We need to continue with a leader who unites all religions and all races of Indonesia,” said Wayan Koster, the governor of Bali.
By contrast, in Aceh, a region where Shariah law is instituted and people have been whipped by the local authorities for gay sex and adultery, Mr. Joko captured only about 14 percent of the ballots.
In all, Mr. Joko won 21 of Indonesia’s 34 provinces.
Tuesday’s results will be not considered final until any complaints lodged against the vote-counting process are resolved, which could take days or even weeks. In 2014, Mr. Prabowo filed a protest against the election result, delaying the official announcement for months.
Earlier this month, campaign workers for Mr. Prabowo said they found at least 13,000 voting inconsistencies, although international observers declared the elections free and fair.
Last month’s elections, for both presidential and legislative seats, involved more than 800,000 polling stations spread out across thousands of islands flung across the Equator. With about 260 million people, Indonesia is the world’s third-largest democracy, having emerged from decades of dictatorship in 1998.
Mr. Prabowo was once married to the daughter of Suharto, the strongman accused of stealing billions of dollars from national coffers during his more than 30 years in power.
Mr. Joko, a former furniture exporter, is the first elected Indonesian president who is not from the country’s political or military elite. After serving as a city mayor, he became governor of Jakarta, the capital, and won plaudits for cutting through red tape in a country with a reputation as one of the most corrupt in the world.
“My strategy is to manage the country like a country, not a business,” Mr. Joko said in an interview. “Some of the effects of these programs — health, education, infrastructure — will come later when I am not president anymore. But we cannot calculate short-term returns when it’s about the long-term national interest.”
But even as he unveiled ambitious health and education funding, along with more than 1,000 miles of new roads, Mr. Joko was criticized for not having adequately protected minority groups’ rights during his first five-year term.
In 2017, a former political protégé of his was jailed for what human rights activists considered trumped-up charges of blasphemy. Amid a hardening of global Islam, Mr. Joko chose a conservative cleric as his running mate in last month’s elections, prompting fears that his commitment to moderate faith may be undermined in his own cabinet.
Over the past couple years, radical Muslim militants have targeted churches and police stations, with the Islamic State claiming some of the fatal attacks. Hundreds of Indonesians went to fight with the Islamic State, and last week the police said they had uncovered a bombing plot involving returnees from Syria who planned to bomb election-related gatherings planned for this week.
The United States Embassy in Jakarta has issued a security warning for Americans in Indonesia, warning them to stay away from political rallies or other large crowds.