The founding of Tunis is tied up with one of the greatest epics of Western literature. In Virgil's Aeneid, Queen Dido establishes the city of Carthage, Tunis' historic predecessor.
Phoenician Carthage produced equally famous sons as well as daughters, most notably King Hannibal, who took on the might of Rome by marching his elephants over the Alps, in one of the many Punic Wars that the two great powers fought.
Even after the collapse of Rome, Carthage waited a long time to rise again. In the 8th century, the Arabs arrived and brought Islam to the region. The town of Tunes itself had been in existence since at least the 4th century BCE, but the Arab conquest changed its fortunes as a great centre of trade and learning.
As Arab power waned, Tunis became a prize fought over by newer Mediterranean powers. In the 16th century, the city fell under the rule of the Ottoman Empire, although it was attacked more than once and occupied by Spanish forces. Over the centuries, Algerians, Venetians and English inflicted defeats on Tunis.
In the 19th century, Tunisia became a French protectorate during Europe's 'Scramble for Africa'. Soon, the modern Ville Nouvelle (new town) was established next to the Arab medina. It then expanded rapidly beyond the ancient city walls, becoming an important Mediterranean port town, with many immigrants settling.
During WWII, Tunis was occupied by the Nazis and it was their last outpost in Africa before the British seized control. After the war, Tunis began to experience rapid industrialisation and finally became capital of an independent Tunisia in 1956.
The city's population became known over subsequent decades for being well educated and relatively European in its outlook and attitudes. In 2011, it led the way in the tumultuous Arab Spring, ousting long-time autocrat Ben Ali, and seeing a largely smooth transition to democracy.
Did you know?
• Under the Arabs, Tunis was a vital military base due to its proximity to Sicily and other important Mediterranean coastal settlements.
• Tunis first became a capital city after the Almohad conquest in the 12th century.
• The mighty Al-Zaytouna Mosque was only the second to be built in the Maghreb region of Northern Africa.