Jakarta, Indonesia (CNN) -- Jakarta governor and former furniture salesman Joko "Jokowi" Widodo won Indonesia's presidential election, officials said Tuesday, setting him up to be the first person who didn't boast a military or elite background to take the office.
His challenger rejected the election hours before the result was announced, citing what he said was massive cheating. It wasn't immediately clear what effect his complaint would have.
Widodo won 53% of the July 9 vote, the country's election commission said. His challenger, former military man Prabowo Subianto, a onetime son-in-law to the late Indonesian dictator Suharto, received 47%.
The charismatic Widodo styled himself a man of the people, and his background appealed to the country's poor. Before entering politics, Widodo worked in his family's furniture business and started his own export company, which he made a huge success.
In 2005, he was elected mayor of Surakarta and became known for his spontaneous visits to slums, which drew media attention, and unannounced drop-ins at government offices to catch underperforming workers.
He rose to become Jakarta governor in 2012, where he piloted new health care and education programs.
In the presidential election, he overcame his critics, who said he was Widodo too inexperienced and hadn't finished his work in Jakarta. Several major projects, including a new railway, remain behind schedule.
Before official results were announced, Prabowo on Tuesday declared he was rejecting the election process and withdrawing.
In a speech aired live, Prabowo cited "massive, structural and systematic cheating during the 2014 election," and said, "we will exercise our constitutional right to reject the presidential election and declare it unconstitutional.
"We withdraw ourselves from the process."
When told of Prabowo's announcement, Widodo replied: "I am sure Prabowo is a statesman who will put the national interest above everything else."
There had been indications that a challenge was likely to be launched from Prabowo, but his allegations are unprecedented, said Douglas Ramage, an analyst from Bower's Asia Group, based in Jakarta.
"This is the first time anyone has questioned the legitimacy of the democratic process itself," he said. "Since 1999, no participant in the process has asserted that the process itself has been illegitimate.
"We're in uncharted territory here."
The election commission said Tuesday that the result would be legally binding if no complaints are filed at the constitutional court within 72 hours.
Under Indonesia's election laws, either of the presidential candidates has the right to lodge a legal challenge in the court. Whether Prabowo would do so wasn't immediately clear.
Prabowo, the leader of the Great Indonesia Movement (Gerindra) party, had touted his military service and projected the image of a decisive man capable of taking charge.
He became part of one of the most influential families when he married Suharto's daughter, Siti Hediyati Hari, in 1983. They have since divorced, but his ex-wife backs his candidacy, even appearing publicly in his campaign events.
Hours after the polls closed on voting day, unofficial quick counts, or samples from polling stations, revealed a slight edge for Widodo.
Widodo declared victory after seeing results of the unofficial quick vote earlier this month, telling his supporters: "It's not a victory for the party, not a victory for the team but this is a victory for all Indonesian people."
Ramage said that the election process has been transparent as results were posted as they've been counted.
"The key thing in the next few hours and the next day will be to see the reaction of the rest of Indonesia's political elite and the heads of the country's democratic institutions"
Over the weekend, Prabowo asked the election commission to delay the results, because of what he and his camp claimed were cheating and manipulation across polling stations. He asked the election commission to stop counting the votes until the alleged cheating cases were resolved.
But on Monday, the election commissioner, Arif Budiman, denied Prabowo's request to delay the release of the election results. Nearly two weeks have passed since election day, meaning the paper ballots have been counted.
Fadli Zon, one of the leaders of Prabowo's Gerindra party, said they would not accept the results and will fight "in a non-violent way."
CNN's Kathy Quiano reported from Jakarta, Indonesia and Madison Park wrote from Hong Kong. CNN's Casey Tolan and Jason Hanna contributed to this report.