JAKARTA - The reform-minded governor of teeming Jakarta, Joko Widodo, has comfortably won Indonesia's closely-fought presidential race against a controversial ex-general with deep roots in the era of strongman Suharto, final results showed Tuesday.
Widodo, known by his nickname Jokowi, won around 53 per cent of the vote compared to about 47 per cent for Prabowo Subianto, according to a final tally cited by local media in the world's third biggest democracy.
The official announcement of the result of the July 9 election was expected shortly.
Widodo's victory caps a meteoric rise for the former furniture exporter who was born in a riverbank slum. It will be welcomed by investors who hope he can breathe new life into Southeast Asia's biggest economy after a recent slowdown.
Voters faced a stark choice between governor Widodo, from a new breed of politicians without links to the autocratic Suharto era, and Prabowo, a figure from the old guard with a chequered human rights record.
The news came just hours after Prabowo - who had also claimed victory in the election - alleged fraud and said he was withdrawing from the race.
Prabowo, 62, had been widely expected to challenge the result in the Constitutional Court if he lost, but a spokesman for his team said this was no longer an option since they had withdrawn from the whole process.
The decision removes the prospect of prolonged political deadlock because the court would not have ruled until the end of August.
Speaking to reporters earlier in Jakarta, Prabowo claimed there had been "a massive, structured and systematic fraud" in the 2014 elections.
"The presidential election, organised by the (election commission), is not democratic," he told reporters, adding the commission was "not fair or transparent".
Widodo however insisted that "everything was transparent, everything was open" during the election in the world's most populous Muslim-majority nation. Independent analysts have said the poll has been largely free and fair.
Tensions have risen sharply since election day as each side accused the other of seeking to tamper with the votes during the lengthy counting process across the world's biggest archipelago nation.
There were fears the tension could spark unrest in a country that was hit by repeated outbreaks of violence before Suharto's downfall in 1998, and more than 250,000 police were deployed across the country on Tuesday.
Security was particularly tight in the capital Jakarta, with hundreds of police in riot gear stationed around the election commission headquarters, and roads around the centre of the capital closed off to traffic.
But police and politicians appealed for supporters not to take to the streets and by early evening there was no sign of major demonstrations.
Despite Prabowo's repeated accusations the coalition backing him appeared to be falling apart in recent days, with several key members reportedly conceding defeat.
Even President Susilo Bambang Yudhoyono hinted Monday that the ex-general should accept the result if he loses, saying: "Conceding defeat is noble." Widodo was the long-time favourite to become president. But a huge poll lead he held for months dwindled to single digits during the most divisive election campaign of Indonesia's short democratic era, which began with Suharto's fall in 1998.
However, on election day, pollsters with a track record of accurately predicting Indonesian election outcomes gave Widodo a slim but decisive lead, and only a small number of lesser-known survey institutes called a win for Prabowo.
Widodo, 53, won legions of fans during his time as Jakarta governor with his common touch, regularly making visits to the city's slums in casual clothes.
In contrast Prabowo, who won support with fiery nationalistic speeches, used to command the army's feared special forces during the Suharto era and was formerly married to one of the dictator's daughters.