Since prehistoric times, Tunisia has been inhabited.The first known signs of human occupation whose traces have been found in the regions of Le Kef and Gafsa belong the Palelithic and Capsian eras.The Neolithic period has left us dolmens and megaliths, particuliary in the Cap-Bon area.

The berbers, the first inhabitants of the Maghreb, constitute the ethnic base of the Tunisian population.They called themselves the "Amazighs"(i. e. free men) and their origins and history remain shrouded in mystery.They lived in tribes and wandered freely over enourmous stretches of land, breeding animals and engaging in agriculture. 

With the arrival of the Phoenicians in the 11th century b.c.,Tunisia broke out of Prehistory.The new members set up numerous establishments along the coast ,in particular Utica (before the end of the second millenium) and then Carthage(in 814 b.c.), a very important town. The "new town" prospered and established settlements all over the western Mediterranean to become the metropolis of a vast empire streching from Spain to Tripolitania.
After the first punic war(264-241 b.c.), Carthage was forced to evacuate Sicily.
Hannibal sought revenge and took his army across the Pyrennes and the Alps to win many victories in Italy.
But Rome attacked Carthage in Africa and won the decisive war of Zama(202 b.c.). After the third punic war, Carthage was destroyed(146 b.c.) by the romans, but annexed to the roman empire ,the old punik land gave birth to the province of Africa.
In the early VIth century ,the vandals settled in the country and ruled for a century .In 533,they were chased out by the Byzantines; these however, were unable to restore the former lands prosperity. 

In the mid-VIIth century, Tunisia was brought into Muslim World and Kairouan, founded in 670 by Okba Ibn Nafaa, became the brilliant capital of Ifrikiya.
The Aghlabite dynasty(800-909)
After a transitional and organizational phase which lasted up to the VIIIth century, Ibrahim Ibn El Aghlab founded the dynasty which reigned for over a century.
Agriculture and handicrafts developped ; naval building sites operated in Tunis and Sousse; towns saw the advents of town planning with the building of mosques and magistrates and defense edifices : the Kairouan Mosque , pools and palaces ; the Ribat of Sousse and Monastir.
Kairouan was the center of the intellectual ferment.The Melikite faith triumphed with Imam Souhnoun.
The Fatimids(910-973)and the Zirids(973-1159)
Shiite propaganda disseminated by the missionary Abou Abdallah and supported by the Koutama Berbers caused a revolt which put an end to the aghlabite rule.
Set up by his supporters in power, Obeid Allah Almahdi took the title of Caliph and founded a new capital city Mahdia.
In 973, Caliph El Moiz, after conquering Egypt and founding cairo, went to live in his new capital leaving the power in the hands of Ibn Ziri, the son of berbers Sanhaja tribes chief.Ibn Ziri founded the Sanhaja power_the first dynasty of berber origin_, whose realm extended through the whole Maghreb.
Many famous thinkers, Writers and artists belong to that period: Ibn Al-Jazzar, Ibn Charaf, Ibn Rachik..

The Hafsids(1236-1574)

The Turkish period(1574-1705)

The Husseinite dynasty(1705-1957)

The Protectorate(1881-1956)