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.

Mr. Joko, 57, a moderate technocrat with an enthusiasm for infrastructure projects and a reputation for celebrating Indonesia’s religious and ethnic diversity, 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.