Home of the ancient city of Carthage, Tunisia was once an important player in the Mediterranean, thanks to its location in the centre of North Africa, close to vital shipping routes.
The Romans, Arabs, Ottoman Turks and French realised its strategic significance, making it a hub for control over the region.
French colonial rule ended in 1956, and Tunisia was led for three decades by Habib Bourguiba, who advanced secular ideas, foremost of which was the emancipation of women.
Tunisia is more prosperous than its neighbours. Agriculture employs a large part of the workforce and tourism is a key sector.
Mass protests unseated President Ben Ali in 2011 – the first of a series of popular uprisings to sweep the region.
The country’s transition has been relatively peaceful, but secular Tunisians, especially women, are worried about the growing influence of ultra-conservative Islamists. And there is a mounting challenge posed by Islamist militants who claimed responsibility for attacks in 2015 in which 60 people were killed, most of them foreigners.
President: Mohamed Beji Caid Essebsi
Beji Caid Essebsi came to office in December 2014 after winning the first free presidential election since the uprising that toppled autocratic leader Zine al-Abidine Ben Ali.
He was a long-serving speaker of parliament under Mr Ben Ali’s rule, and critics believe his rise to power marks the return of the ousted political establishment.
Prime Minister: Habib Essid
A long-serving agriculture official under President Ben Ali, Mr Essid was interior minister and security adviser in various subsequent governments before President Essebsi appointed him prime minister in early 2015.
His secular coalition of the president’s Nidaa Tounes and Free Patriotic Union also includes representatives of the liberal Afek Tounes and Islamist Ennahda parties, in order to maintain a stable parliamentary majority.
Mr Essid faced serious challenges from a campaign of violence by the Islamic State extremist group, which killed more than 60 people in two attacks targeting tourists at the Bardo Museum and the resort of Sousse. He responded firmly by announcing a crackdown on Islamist extremists and mosques that preach their message.
The Tunisian media now enjoy greater freedom than before the 2011 popular revolt.
Social media played a key role in the uprising.
Some key dates in Tunisia’s history:
Circa 1100 BC – Phoenicians settle the north African coast. The city of Carthage, near the site of present-day Tunis, becomes a naval power.
146 BC – Carthage falls to the Romans.
600s – Arabs conquer the territory of present-day Tunisia.
909 – Berbers wrest the region from the Arabs.
1600s – Tunisia becomes part of the Turkish Ottoman empire, but has a high degree of autonomy.
1881 – French troops occupy Tunis. France controls economic and foreign affairs; Tunisia is a French protectorate from 1883.
1956 – Tunisia becomes independent with Habib Bourguiba as prime minister, monarchy is abolished and Tunisia becomes a republic the following year.
1987 – ‘Palace coup’: Prime Minister Zine El Abidine Ben Ali has President Bourguiba declared mentally unfit to rule and takes power himself.
2011 – Mass protests drive President Ben Ali into exile.
All copyrights for this article are reserved to bbc middle east