Looking at a map of modern Tunisia, you might be forgiven for thinking that this is a country that could only have ever been a bit-part player, a tiny speck trapped between the giants of Algeria and Libya. But Tunisia’s history is actually a rich and storied one, from the ruins of Carthage, whose ruler Hannibal dared to challenge Rome, to the glories of medieval Islam and into the forward-facing modern period.

First Peoples

Africa is the cradle of humanity, and around 200,000 years ago Stone Age people were taking their first baby steps on Tunisian soil. This period was wetter than the present, and the Sahara was a long way from North Africa. Rather than sand, southern Tunisia was covered with forest and savannah (with animals to match), as remains discovered in oases like Kelibia have shown.

However, even ancient humans weren’t immune to climate change. At the end of the last Ice Age, some 8000 years ago, the Sahara began to dry and spread, isolating North Africa from the rest of the continent. Migrants arrived from the east, most notably the Capsians, named for the city of Gafsa, where many of their finely sculpted stone and bone implements have been excavated. The Capsians were well placed to take advantage of the new practices of agriculture and animal domestication introduced from the Nile Valley, settling into village life and developing sophisticated pottery. By about 1200 BC, the introduction of the horse into North Africa completed the picture. The Capsians were history, and the Berbers had arrived.

The Glory Days of Carthage

One name looms above all in Tunisia's history: Carthage. Now a well-heeled northern suburb of Tunis, this great trading city emerged to dominate the western Mediterranean in the 6th century BC.

The Berbers had remained isolated from the Bronze Age revolution that had swept the Near East, and must have been more than a little bemused when ship-loads of Phoenicians (from modern Lebanon) struck anchor on the Tunisian coast in the 9th century BC, looking for ports to link their mother city of Tyre to the silver mines of southern Spain. Their first coastal settlement was Utica (Utique), about 35km northwest of Tunis, founded around 1100 BC, with Hadrumètum (Sousse), Hippo Diarrhytus (Bizerte) and Thrabaka (Tabarka) following in quick succession.

Of all the settlements, the most glorious was to be Carthage. Founded in part as a response to a growing Greek presence in the region, its importance grew as Tyre itself suffered at the hands of the rising Assyrian empire of modern Iraq. Carthage eventually grew into the great metropolis of the Phoenician world, its wealth and trading craft protected by a powerful navy. By the end of the 6th century BC, Carthage had become the main power in the western Mediterranean, controlling the North African coast from Tripolitania (western Libya) to the Atlantic, with colonies in the Balearic Islands, Corsica, Malta, Sardinia and Sicily.

With control of the seas, for the next two centuries Carthage turned its face inland, carving out territory from the Berbers until it held lands roughly equalling the map of modern Tunisia. Most important were the fertile lands of the Cap Bon peninsula and the Medjerda Valley, which supplied Carthage with a large agricultural surplus for export. From small roots, the Carthaginians had found themselves sitting astride a regional empire.

Conflict inevitably followed, with rival Mediterranean powers squaring up to take a swing at this new power. Carthage fought several wars with Greece over possession of Sicily (just 150km northeast of Carthage), eventually taking permanent control of the island in the middle of the 3rd century BC. The rule of Athens had waned, only to be replaced with an even more potent rival in an ascendant Rome.

The scene was thus set for the first of the three Punic wars that would preoccupy the two powers for the next 100 years. Rome launched the first war in 263 BC with a campaign to win control of Sicily. The Roman army was the superior machine on land, but Carthage’s navy held the whip hand at sea, ensuring a stalemate that dragged on for 20 years.

Rome finally achieved a breakthrough when its fledgling navy destroyed the Carthaginian fleet off Trapani (eastern Sicily) in 242 BC. Crippled and close to bankruptcy, Carthage sued for peace and abandoned Sicily; four years later it was forced to give up Sardinia and Corsica too. Trouble on the home front also grew as unpaid mercenaries in Carthage’s army revolted, sparking further conflict.

The Second Punic War is most famously remembered for Hannibal marching his elephants over the Alps, but while he won a famous victory at the Battle of Cannae that nearly toppled Rome for good, the war ultimately resulted in another humiliating defeat for Carthage.

However, Carthage’s potency couldn’t be kept down for long. Despite losing its overseas possessions to Rome, and much of its African territory to the Numidian king Massinissa (a Roman ally), Carthage slowly rebuilt itself as a commercial centre. Political ambitions would surely follow.

The first two Punic wars had taken a mighty toll on the Roman Empire in blood and treasure, and Carthage’s resurgence caused increasing unease in Rome. Whipped up by the Senate, Rome launched the Third Punic War with the intention of settling the issue once and for all. In 149 BC, the Roman army again landed at Utica and laid siege to Carthage for three years. When the city finally fell in 146 BC, the Romans showed no mercy. Carthage was utterly destroyed and then ceremonially cursed, its agricultural lands symbolically sown with salt to ensure that they would remain forever barren. Phoenician, and therefore Carthaginian, civilisation in North Africa came to be called ‘Punic’ because the Romans referred to the people of Carthage as ‘Poeni’, a Latinised version of Phoenician.

Roman Rebirth

With Carthage in ruins and Roman expansionary priorities lying elsewhere, Rome seemed at a loss as to what to do with its new acquisition. It was happy to leave most of the country to the Berber rulers of Numidia and doubtless they, in turn, were happy to be left alone after centuries of Carthaginian oppression. Under Massinissa, the Numidians had established a kingdom that stretched from western Algeria to Libya, its major towns including Sicca Veneria (Le Kef), Thugga (Dougga) and Vaga (Béja). However, upon Massinissa’s death in 148 BC, Rome grabbed the opportunity to cut the kingdom down to size by dividing it up between his three sons.

Peace ruled until Jugurtha, Massinissa’s grandson, managed to reunite Numidia. An absolutely ruthless master of the arts of internecine warfare, his massacre of Roman traders sparked a war that lasted from 112 to 105 BC. According to some researchers, his mountain base was an impregnable mesa (flat-topped mountain) in far western Tunisia, known to this day as Jugurtha’s Table. Jugurtha was eventually betrayed by his father-in-law, taken to Rome and executed.

Again, Rome gave the Numidians another chance, splitting their kingdom into a western half centred on Cirta Regia (in modern Algeria) and an eastern half based at Zama, near Siliana. But a power struggle between Julius Caesar and Pompey saw Rome try to devour itself in civil war. While North Africa had seen several decades of relative freedom from Rome, the Numidian king threw his lot in with Pompey, only to find himself on the losing side, and trounced by Caesar on home turf at the Battle of Thapsus in 46 BC.

Rome was now firmly in control of its African outpost and Roman settlement began in earnest. Julius Caesar re-established Carthage as a Roman city in 44 BC and it became the capital of the expanded colony of Africa Proconsularis.

By the 1st century AD, the wheat-growing plains of the Medjerda Valley and the Tell plateau were supplying more than 60% of the Roman Empire’s grain requirements. Wealthy citizens donated the monumental public buildings – including baths, theatres and temples – that were a hallmark of the Roman cities of the region. The Berbers – and a number of Jewish communities – prospered, and some were granted Roman citizenship.

During this time, Roman Africa supplied the wild animals used in colosseum shows, as well as slaves, gold, ivory, olive oil, ostrich plumes and garum (a spicy condiment made from fermented fish guts). The great Roman cities based on this prosperity – including Bulla Regia, Dougga, El Jem (Thysdrus), Haidra, Sbeitla (Sufetula) and Thuburbo Majus – are now among Tunisia’s principal tourist attractions.

The Vandals & the Byzantines

All empires have their day, and by the turn of the 5th century AD, wilder tribes were nipping at Rome’s heels. Having marauded his way across Spain, the Vandal king Gaiseric decided that Rome’s North African colonies looked like easy pickings. He set off across the Strait of Gibraltar in AD 429, bringing about 80,000 men, women and children with him in one of history’s most astonishing invasions. Within 10 years, the Vandals – who were avid Arian Christians – had fought their way across to Carthage, which they made the capital of a short-lived empire. As befits their name, the Vandals built no great monuments and left few cultural or archaeological traces of their rule, which hastened North Africa’s economic decline. By AD 455, Gaiseric had taken the gates of Rome itself.

In the meantime, the Byzantine emperor Justinian, based in Constantinople (Istanbul), had revived the eastern half of the now-Christianised Roman Empire and had similar plans for its western territories. In two battles near Carthage, his general Flavius Belisarius defeated the Vandals in AD 533, ushering in 150 years of Byzantine rule. Like most occupiers before them, the Byzantines lived in a state of instability and constant siege, with Berber chieftains in control of the bulk of the country. They built with their customary zeal, however, and many of Tunisia’s Roman sites feature 6th-century Byzantine churches and fortifications.

Islam & the Arabs

Christianity was about to be severely challenged. In the mid-7th century AD, the armies of the new religion of Islam exploded out of Arabia. Islam’s green banner was flying over Egypt by AD 640 – just eight years after the Prophet Muhammad’s death – and soon after, Tripoli was in Muslim hands. The Arabs inflicted a quick defeat on the Byzantines’ Tunisian armies but withdrew with their spoils, allowing the Byzantines to hold on to their possessions.

Permanent Islamic rule was secured 30 years later. For three years, beginning in AD 669, Okba Ibn Nafaa Al Fihri swept across North Africa, establishing Kairouan along the way, home to one of Africa’s greatest mosques and considered by many Muslims to be Islam’s fourth-holiest city (after Mecca, Medina and Jerusalem).

The Berbers, a mix of Christian, Jew and pagan, readily adopted this potent new religion, but took less kindly to their new Arab overlords. In AD 683 the Arabs were forced to abandon North Africa after their defeat by a combined Berber-Byzantine army. The victors were led by the Berber chieftain Qusayla, who then established his own Islamic kingdom based at Kairouan.

The Arabs soon regrouped, retaking Kairouan in AD 689 and permanently dislodging the Byzantines from Carthage in AD 698. However, they continued to encounter spirited resistance from the Berbers, who had rallied behind the legendary princess Al Kahina. She defeated the Arabs at Tébessa (Algeria) in AD 696, but was eventually cornered and killed after a legendary last stand at El Jem in AD 701. North Africa, with Kairouan as its capital, became a province of the rapidly expanding Islamic empire controlled by the Umayyad caliphs, based in Damascus. The region was renamed the province of Ifriqiyya, from the Arabic for Africa.

Arab rule was hardly peaceful, and the brutal behaviour of Arab militias repeatedly provoked reprisal attacks from the Berbers. The locals increasingly took strength from the teachings of the Kharijites, a puritanical Islamic sect whose egalitarian beliefs contrasted sharply with the arrogant and worldly ways of the Umayyad elite. From Tangier to Tunisia, the caliphate was faced with regular uprisings against Arab rule.

North African Dynasties

Tunisia, like much of North Africa, was always too geographically distant from the great centres of Islamic power – such as Baghdad, Damascus and even Cairo – to be ruled directly. As a result, competition between Arabs and Berbers gave way to an often confusing tumble of local and foreign-imposed dynasties.

At the close of the 8th century, the Baghdad-based Abbasids, successors to the Umayyads, appointed Ibrahim Ibn Al Aghlab as governor of Ifriqiyya. With Kairouan as his capital, he soon established effective control of Tunisia, eastern Algeria and much of Libya. He was so successful that the Abbasid caliph Harun Al Rashid (hero of many of the One Thousand and One Nights tales) made him hereditary emir. Thus was born the successful Aghlabid dynasty, which ruled Tunisia on behalf of Baghdad for more than a century. Many of Tunisia’s most enduring architectural monuments, such as the Great Mosque in Kairouan and the ribats (forts) at Sousse and Monastir date from this period.

Next came the Fatimids (named after Fatima, the Prophet Muhammad's daughter), a group of Berber Shiites from the Kabylie region of central Algeria on a mission from God, as they saw it, to depose the religiously illegitimate Abbasid caliphate and declare their leader, Obeid Allah, as caliph. Through alliances with disaffected Berber tribes, the Fatimids quickly conquered North Africa, defeating the Aghlabids in AD 909; a year later Obeid Allah was declared the ‘true caliph’ at Raqqada, south of Kairouan.

Anticipating reprisals, the Fatimids built a new capital, Mahdia, on a small, easily defended coastal headland and set about plotting the conquest of Egypt. In AD 969 they took control of the Nile Valley and founded another new capital, Cairo.

A new dynasty, the Zirids, arose in Ifriqiyya but pressure began to mount for a return to religious orthodoxy. In 1045 the Zirids caved in and officially returned to the Sunni mainstream, in open defiance of the Cairo-based Fatimids. The Fatimid reaction was devastating: the Bani Hilal and Bani Sulaim nomadic tribes of upper Egypt invaded the Maghreb en masse, and over the following century, North Africa was slowly reduced to ruins. For a time in the mid-1100s even the Normans – yes, the same people who invaded England in 1066 – held parts of the Tunisian coast.

The power vacuum was eventually filled by the puritanical Almohads, who came to power in Morocco at the beginning of the 12th century. They completed their conquest of North Africa with the capture of Mahdia in 1160, but their empire almost immediately began to crumble. The Maghreb split into three parts: Ifriqiyya (Tunisia) came under the Hafsids; Algeria under the Banu Abd Al Wad; and the Merenids took Morocco. Although borders have changed and rulers have come and gone, this division remains more or less intact today. However, with division came lack of influence, and North Africa spent the next few centuries as a relative backwater, away from the political powers emerging elsewhere – the rise of the Ottoman Empire that had moved the Muslim centre of gravity to Istanbul, and the reconquest of Spain from the Arabs that had given birth to an ever-expanding Christian Spanish superpower.

Ottoman Control

The Ottomans and Spanish competed hard for control of North Africa and the Mediterranean, and inevitably, Tunisia was swept up in the conflict. Hafsid Tunisia had turned to the Muslim Corsairs, or pirates, for both income and security. The most famous of the Corsairs were Barbarossa brothers, Aruj and Khair Ed Din, who had established themselves on the island of Djerba. Aruj captured Algiers from the Spanish but was killed when they retook the city in 1518. Khair Ed Din turned to the Ottomans for help, who jumped at the chance to get involved. He was given the Turkish title of beylerbey (governor) and supplied with troops.

Tunis was to change hands four more times before Sinan Pasha finally claimed it for the Turks in 1574, forcing the last of the Hafsids into exile. Tunis once again became a province of a distant Ottoman Empire. A nominally indigenous dynasty again sprung up – the Muradids, who reined in the Corsairs (who had been provoking the increasingly powerful European navies) in exchange for trading and political ties. But rules of succession were never fixed, resulting in internecine warfare and power struggles up until the early 18th century, when Hussein Ben Ali founded the Husseinite line of beys. He still pledged allegiance to Istanbul, but as Ottoman power began to slowly wane, Tunisia was independent in all but name. The Husseinites ruled Tunisia – at least in title – until the country became a republic in 1957.

French Colonial Dreams

Well into the 19th century, North African pirates had harried the European coast on slaving raids. Great Britain, the Netherlands, France and even the US sent their navies to tackle the so-called Barbary states of Tripoli, Tunis and Algiers once and for all. Powered by the Industrial Revolution, the European powers began stretching their political limbs. Tunisia was forced to ban piracy in 1816, and within 30 years the weakened Bey of Tunis had accepted a French consul with wide-ranging powers, and abolished slavery altogether. These imposed reforms exacted a large toll on his country’s treasury, necessitating heavy borrowing from European banks. Tunisia’s centre of political power again ebbed away from its shores, and by 1869 the country was effectively bankrupt, and its finances were handed over to an international commission.

This was a warm-up for the ‘Scramble for Africa’, when the European powers began dividing up the continent between themselves. In 1881 the French sent 30,000 troops into Tunisia on the pretext of countering border raids by Tunisian tribesmen into French-occupied Algeria. They stayed. The bey remained as Tunisia’s titular head but was forced to sign the Treaty of Kassar Saïd, which put real power in the hands of a French resident-general. The British, France’s great colonial rivals, accepted French domination of Tunisia in exchange for French acquiescence in the British occupation of Cyprus.

The 1883 Convention of La Marsa established parallel justice systems, under which Europeans were judged under French law and local Tunisians under a modified form of Islamic law.

The French went about the business of land acquisition more discreetly than they did in neighbouring Algeria. In Tunisia, they managed to get their hands on the best fertile land without confiscating property from individuals. Rather, they took over large tracts of the Cap Bon peninsula and the Medjerda Valley that had previously been controlled by the bey or used by nomads for grazing. The citrus groves of Cap Bon are a legacy of this time, as are the vineyards that provide the bulk of the country’s wine grapes. In the south, the discovery of a large phosphate deposit at the start of the 20th century created in turn a large mining industry around Gafsa, the exports of which remain an important part of the Tunisian economy to this day.

The Road to Independence

The Tunisian elite initially supported French rule. Compared with Algeria there was no massive influx of colonists, and modernising projects like road building and improved urban sanitation were popular. But by the time of WWI, the ‘Young Tunisian’ movement began calling for more political reforms. In 1920 the Destour (Constitution) Party formed, demanding democratic government, a move supported by the bey. The French responded with troops and arrests and, for a while, managed to derail nationalist initiatives.

In 1934 a young, charismatic, Sorbonne-educated lawyer, Habib Bourguiba (1903–2000), broke away from the Destour Party, founding the Néo-Destour Party. Support for this new grouping quickly spread, but after the French turned their guns on demonstrators in Tunis on 9 April 1938, killing dozens of people, the party was banned and Bourguiba arrested and deported to France. French suppression merely increased the Néo-Destour’s popular support.

When Charles de Gaulle’s Free French took control of Tunisia, Bourguiba returned to Tunisia, but by the end of the war uncompromising anti-nationalist policies forced him into exile again, this time in Cairo. From here he organised a successful propaganda campaign aimed at bringing the Néo-Destour’s pro-independence demands to international attention. In 1951, the French began to soften their position, and allowed Bourguiba to return and at the same time allowing a Tunisian to become nominal prime minister over a joint French-Tunisian cabinet. It was a significant concession, but only fed calls for more political power – demands that Paris responded to by again shunting Bourguiba out of the country.

The watershed year was 1954. Nationalist guerrilla violence had thrown the country into disarray. The Algerian war of independence had begun, Morocco was agitating for self-rule and the French army had suffered a humiliating defeat by Ho Chi Minh’s forces at Dien Bien Phu in Vietnam. Throwing its hands up, France announced its readiness for negotiations on Tunisian autonomy. In June 1955 an agreement was reached and Bourguiba – who had spent half of the previous two decades in detention or exile – returned to Tunis to a hero’s welcome.

Tunisia was formally granted full independence on 20 March 1956 (just 18 days after Moroccan independence), and Bourguiba became prime minister. Within a year, the bey’s throne was abolished and the country declared a republic, with Bourguiba as Tunisia’s first president.

Tunisia Under Bourguiba

An early priority was to remove the remaining French military forces on Tunisian soil – a resolve that stiffened in 1958 when the French air force, in pursuit of Algerian rebels, bombed the Tunisian border village of Sakhiet Sidi Youssef, killing 62 civilians.

Bourguiba repeatedly demanded that France evacuate its last military enclave at Bizerte. When Tunisian troops invaded the French base in 1961, French paratroops – flown in from Algeria – and aircraft launched a bloody retaliatory operation in which more than 1000 Tunisians died during 90 hours of fierce fighting. The French finally withdrew from Bizerte in 1963.

Both domestically and internationally, Bourguiba fitted the secular-socialist mould that was popular across the newly independent Arab nations. Modernisation of the economy and society alike was the order of the day, and when pan-Arabist socialism faltered, Bourguiba pragmatically took up a more pro-Western modernising approach. The results of his bold efforts to emancipate women, including the abolition of polygamy, are a prominent feature of Tunisian life to this day, and Tunisia became a showcase for successful postcolonial development.

Bourguiba regarded Islam as a force that was holding the country back and sought to deprive religious leaders of their grass-roots role in shaping society, in part by closing religious schools and abolishing sharia (Islamic law) courts. In addition, land that had financed mosques and religious institutions was confiscated. Not surprisingly, clerics vehemently opposed the changes and for a time resistance flared, particularly in Kairouan.

The 1970s saw the gradual emergence of an Islamic opposition whose support increased dramatically following the use of the military to crush a general strike in January 1978, killing dozens of people. Under increasing pressure at home and abroad, Bourguiba called the first multiparty elections in 1981, though the Islamic opposition was not allowed to run and there were cries of foul play.

Anxious to preserve its power and desperate to avoid the upheaval and violence caused by Islamic militants in Algeria and Egypt, Bourguiba’s government spent much of the 1980s conducting a harsh and effective clampdown against the Islamist opposition. In early 1984 the withdrawal of a bread subsidy sparked six days of rioting, notable for slogans such as ‘God is great’ and ‘down with America’; more than 70 people died. To ease tensions, the bread subsidies were reinstated and a number of jailed Islamist politicians freed.

Against all this, Bourguiba’s decades-long reign (he was declared President-for-Life in 1974) was stagnating and he was seen as being increasingly out of touch with the concerns and needs of the common people. On 7 November 1987, Prime Minister Zine El Abidine Ben Ali, afraid that executing several Islamists convicted of plotting to overthrow the government – as demanded by Bourguiba – would spark a popular uprising, seized power in a bloodless palace coup. A team of doctors declared the 83-year-old president mentally incapable of carrying out his duties.

Bourguiba died in 2000 at the age of 96, having lived out his last years in Monastir.

Tunisia Under Ben Ali

Ben Ali brought a surer touch to Tunisian politics than Bourguiba’s final years, but his recipe for rule was essentially more of the same: a moderate, pro-Western foreign policy, with secularism at home reinforced with repression of political and religious opponents. At the same time, Ben Ali wasn’t shy of using his Muslim faith to draw fire away from more radical Islamist critics.

The tension between Islamism and political plurality did not always play out happily under Ben Ali. In the early 1990s an alleged Islamist coup plot was uncovered and thousands of suspected fundamentalists were imprisoned; many others fled into exile. Political parties, journalists and unions were also severely restricted. Having eviscerated the Islamist opposition, Ben Ali then sought to borrow its clothes by making a very public pilgrimage to Mecca and ordering that the Ramadan fast be observed in public. He also promised a multiparty political system, released some political prisoners, abolished the State Security Court and limited police powers of detention. Political exiles were invited to return, and many decided that it was safe to do so.

The dubiously overwhelming results at the 1989 and 1994 elections affirmed his stranglehold on the presidency, peaking with a 99.44% majority in the 1999 and 2004 elections. Having been expected to retire in 2004, Ben Ali tweaked the constitution and allowed himself to run for another two terms, and in 2009 was unsurprisingly returned to power again (his approval rating finally slipped below 90%, with 89.6% of the vote). All parties seeking to blend politics and Islam were kept firmly away from the ballot papers. Official censorship in print and online meant that while freedom of speech was enshrined in the constitution, it did not translate into meaningful results on the ground. Corruption, flowing straight from the presidential palace, was endemic. Something had to give.

The Arab Spring

On 17 December 2010, a young Tunisian street trader in the provincial town of Sidi Bou Zid, Mohamed Bouazizi, set fire to himself in protest at his treatment at the hands of the police and local authorities. He died 18 days later, but his desperate act of self-immolation set off a wave of protests and regime change across the region and the wider Arab world.

Local protests in Tunisia went national, calling for political and economic reforms. It was an unstoppable tide, and it forced Ben Ali and his family to flee into exile in Saudi Arabia, where they remain to this day. In October 2011, just 10 months after Bouazizi committed suicide, the Islamist Ennahda Party won the largest number of seats in national elections, although it fell short of a parliamentary majority.

The political pendulum shifted back in favour of secular parties with the 2014 elections, but three terrorist attacks in 2015 – including two targeting foreign tourists in Tunis and Sousse – and ongoing concerns about fundamentalist Islamist activity, particularly in the south and in border regions, have cast a pall over the country's future.