An 88-year-old veteran of Tunisia's political establishment has won the country's presidency, according to official results, capping a four-year-long democratic transition.
Beji Caid Essebsi campaigned on restoring the "prestige of the state" and a return to stability from the years of turmoil that followed the North African country's 2011 overthrow of dictator Zine El Abidine Ben Ali that kicked off the regional pro-democracy uprisings of the Arab Spring.
It is a measure of the country's yearning for a return to stability after four hard years that a revolution of the youth calling for change and social justice has ended up electing such a symbol of the old regime.
Mr Essebsi, who received 55.68% of the vote, once served as Ben Ali's speaker of parliament and before that was both foreign and interior minister for his predecessor, Habib Bourguiba.
His rival, outgoing interim president Moncef Marzouki, who made his name defending human rights against Ben Ali, received 44.32% of the vote. Exit polls had predicted similar results soon after polls closed on Sunday night.
Voting was largely pronounced free and fair, with a participation rate of 60%, less than the nearly 70% in the previous round and in recent legislative elections.
Riots did erupt on Sunday night in the southern industrial city of Gabes, where youths protested against the results and clashed with police. After several were arrested, the clashes began anew on Monday and two police stations were burned.
The voting split on geographical lines, with the affluent northern and coastal regions - the traditional home of Tunisia's leadership - voting for Mr Essebsi while the more impoverished and neglected south and interior voted for Mr Marzouki.
Tunisia's powerful Islamist party Ennahda officially remained neutral but its supporters are believed to have backed Mr Marzouki.
As interior minister in the 1980s, Mr Essebsi helped jail many Islamists.
Mr Essebsi claimed victory on Sunday night and reached out to Mr Marzouki's supporters, calling for everyone to work together to overcome the country's grave economic challenges.