Tunisia's Constituent Assembly has elected Moncef Marzouki, a former human rights activist and opposition leader, as the country's president.
Mr Marzouki comes from the secular centre-left Congress for the Republic party, which came second in recent elections.
He spent two decades in exile in Paris before returning to Tunisia in January days after the toppling of former president Zine al-Abidine Ben Ali.
His party had previously been banned.
Mr Marzouki, 66, was chosen by 153 out of 217 members of the Constituent Assembly.
The body was elected in October to draw up a new constitution and appoint a transitional government.
One of Mr Marzouki's first tasks will be to formally designate Hamadi Jebali, from the moderate Islamist Ennahda party, as prime minister.
Ennahda won 89 seats in October's election making it by far the largest party.