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.
Population 11.5 million
Area 164,150 sq km (63,378 sq miles)
Major languages Arabic (official), French
Major religion Islam
Life expectancy 74 years (men), 78 years (women)
Currency Tunisian dinar
President: Kais Saied
Retired law professor Kais Saied won a landslide victory over media mogul Nabil Karoui in the October 2019 presidential election run-off.
Mr Saied, who was 61 when elected, campaigned on an anti-corruption platform, and appealed directly to young voters.
He has faced considerable criticism for his conservative views on homosexuality, women's rights and capital punishment, which was suspended in 1994.
The previous president, Beji Caid Essebsi, died in office in July, after winning the country's first free presidential election in December 2014.
Prime Minister: Hichem Mechichi
Parliament approved a new government led by Hichem Mechichi in September 2020, the third administration since elections the previous October.
Mr Mechichi's ministers are technocrats free of affiliation to political parties, tasked with reforming public finances at a time of economic crisis and political instability.
The new prime minister, a lawyer by training, served as interior minister in the outgoing government.
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, inspiring other popular uprisings collectively known as the "Arab Spring".