Veteran Tunisian politician Beji Caid Essebsi won the country's first free presidential election, in the final step of a transition to democracy after an uprising that ousted autocrat Zine El-Abidine Ben Ali in 2011.
Essebsi beat rival and incumbent Moncef Marzouki with 55.68 percent of the vote against 44.32 percent in Sunday's run-off ballot between the two men, according the results released on Monday by the electoral authorities.
A former official under Ben Ali, Essebsi recast himself as a technocrat. His secular party Nidaa Tounes - Call for Tunisia - profited from a backlash against the post-revolt Islamist government, which many voters blamed for turmoil after 2011.
Outside the Nidaa Tounes headquarters in the capital Tunis, several hundred jubilant supporters took to the streets to celebrate, waving Tunisia's red and white national flag, singing and honking car horns.
"We succeeded in part of our struggle," Essebsi supporter Aya Khiari said. "These elections were just one round, but the battle to build Tunisia just started."
Marzouki made no immediate statement, but his campaign's official Facebook page said Essebsi's rival had congratulated him on the victory.
Just after results were announced, protesters set fire to a Nidaa Tounes party office in Tataouine in southern Tunisia. Rioting also broke out in another southern town, Hamma, with police firing teargas to disperse hundreds of youths who burned tyres to demonstrate against the return of Ben Ali's old guard.
Critics of Essebsi, an 88-year-old former parliamentary speaker under Ben Ali, see his return as a setback for the 2011 uprising that ousted the veteran ruler and put the North African country on the road to full democracy, with a new constitution and free parliamentary and presidential elections.
The Tunisian uprising also inspired the Arab Spring revolts across North Africa and the Middle East.
U.S. President Barack Obama and U.S. Secretary of State John Kerry congratulated Essebsi on his victory and Tunisia on its conclusion of the first presidential election under the new constitution, according to statements.
"Tunisia has provided a shining example to the region and the world of what can be achieved through dedication to democracy, consensus, and an inclusive political process," Kerry said.
OLD GUARD RETURN
Compromise has been important in Tunisian politics. Essebsi's Nidaa Tounes reached a deal with the Islamist Ennahda party to overcome a political crisis triggered by the murder of two secular leaders last year.
As frontrunner, Essebsi dismissed critics who said victory for him would mark a return of the old guard. He distanced himself from the corruption and abuses of Ben Ali's era, and argued that he was the technocrat Tunisia needed following three messy years of an Islamist-led coalition government.
Marzouki, who had sought refuge in France during the Ben Ali era, painted a potential Essebsi presidency as a reverse for the "Jasmine Revolution" that forced the former autocrat to flee into exile. But many tied Marzouki to the Ennahda government.
Accepting former regime officials - known as the "Remnants" by their critics - back into politics had been one of the compromises that helped restore calm and keep Tunisia's often unsteady transition to democracy on track.
Victory for Essebsi consolidates his secular Nidaa Tounes party's position after it won the most seats in October's parliamentary election, beating out Islamist party Ennahda.
Essebsi's party will now have to decide on a prime minister and form a new government in coalition with smaller parties in the parliament before tackling Tunisia's low-level Islamist militancy and politically sensitive economic reforms.
Ennahda holds the second largest number of seats in congress and it and leftist Popular Front movement are still strong movements that will prove tough opponents in negotiations over policy in parliament.