Anarchism in Tunisia has its roots in the works of the philosopher Ibn Khaldun, with the modern anarchist movement being first brought to the country in the late 19th century by Italian immigrants. The contemporary anarchist movement arose as a result of the Arab Spring and the aftermath of the Tunisian Revolution.
The Amazighs of early Tunisia lived in semi-independent farming villages, composed of small, composite, tribal units under a local leader who worked to harmonize its clans. Management of the affairs in such early Amazigh villages was probably shared with a council of elders. With the Phoenician establishment of Carthage and other city-states, Amazigh villages were inspired to join together in order to marshall large-scale armies, which brought forth the centralization of leadership. Tunisia was subsequently ruled as a state by the Carthaginians, Romans, Vandals and Byzantines, before coming under the control of the Islamic Caliphates. From the 10th-century onwards, medieval Tunisia was ruled as a monarchy by a series of Amazigh dynasties, including the Zirids, Almohads and Hafsids.
An early figure associated with the Tunisian libertarian movement was Ibn Khaldun, a 14th-century philosopher from Tunis, particularly due to his book: the Muqaddimah. Having observed the earliest stages in the primitive accumulation of capital, Ibn Khaldun developed a labor theory of value. He also developed a political theory of social cohesion known as Asabiyyah, describing a form of society united by social solidarity, resembling a philosophy of classical republicanism.
In 1574, Tunisia was conquered by the Ottomans and integrated into the empire as a province. A series of revolutions during the late 17th century eventually resulted in the establishment of the autonomous Beylik of Tunis, governed by the beys, who retained control of Tunisia even after the establishment of the French protectorate of Tunisia.
When the Risorgimento established the united Kingdom of Italy, Tunis became a place of refuge for Italians fleeing persecution by the new government, with many Italian anarchists moving to the city. In the late 19th-century, a number of Italian language anarchist periodicals began to be published in Tunis. These included The Worker (1887-1904) and The Human Protest (1896), edited by the Calabrian doctor Nicolò Converti, as well as The Social Vespers (1924) and The Anarchist Vespers (1924), edited by Paolo Schicchi.
Following the Tunisian independence from France, Habib Bourguiba became the first President of Tunisia, constituting a one party state under the Socialist Destourian Party and proclaiming himself president for life. The government briefly experimented with socialism during the 1960s, under the direction of the trade union leader Ahmed Ben Salah, but this was brought to an end in 1969 after a series of peasant revolts against the policies collectivization and nationalization. In 1987, Bourguiba was removed in a coup d'état by Zine El Abidine Ben Ali, who assumed the presidency. Ben Ali transformed the ruling party into the Democratic Constitutional Rally and began a series of reforms, increasing economic privatization. Controls on the political opposition were loosened, but in practice, the opposition had little power to affect change.
High unemployment, food inflation, corruption, a lack of political freedoms and poor living conditions led to a wave of demonstrations breaking out in December 2011, catalyzed by the self-immolation of Mohamed Bouazizi. Tunisian anarchists were among the participants, including the Disobedience Movement, which called for occupations, general strikes and other acts of civil disobedience. Trade unions also played an integral role in the protests, calling a wave of strikes against the government. After 28 days of sustained civil resistance, in January 2011, the government of Ben Ali was overthrown and Tunisia began a process of democratisation.
The new political climate created by the revolution allowed for the emergence of the Tunisian anarchist movement into the public sphere. But it also saw the growth of Islamism on the political stage, with the Ennahda Movement winning the 2011 Tunisian Constituent Assembly election and forming a coalition government. The Disobedience Movement subsequently denounced what they described as an "counter-revolution" by the new Islamist-led government and issued a declaration of principles calling for the establishment of libertarian socialism in Tunisia.
On February 6, 2013, the left-wing opposition leader Chokri Belaid was assassinated outside his house by an unknown gunman, trigerring a political crisis and igniting a renewed series of protests against the new government. During the protests, the Ennahda Movement's headquarters were set on fire, in an action claimed by Tunisian anarchists. In March 2013, the Disobedience Movement published an anti-capitalist manifesto, in response to the holding of the World Social Forum in Tunis. At the beginning of July 2013, the Disobedience Movement also issued a call for unity of the revolutionary elements in Tunisia. On July 21, 2013, three affiliates of the anarcha-feminist group Feminist Attack were arrested and beaten by police for painting graffiti on the wall of the Ministry of Women's Affairs.
On July 25, 2013, another left-wing political leader Mohamed Brahmi was assassinated outside his home. The Disobedience Movement responded by calling for the establishment of local and regional councils, with the purpose of coordinating the self-management of community resources, as an alternative to the existing state system.
In August 2013, the feminist activist Amina Tyler announced that she was leaving the Femen organization due to Islamophobia. Instead she linked up with Feminist Attack, participating in one of their actions in Tunis, and published a photo of herself topless while lighting a cigarette using a molotov cocktail, with the words "we don't need your democracy" and a circle-a painted on her torso.
In January 2021, a series of protests started after police aggression against a shepherd in Siliana, which saw rioting spread across Tunisia and the deployment of police and the army in several cities, with the arrest of hundreds of people. Anarchists were among a broad coalition of participants in the protests, which notably did not include Islamic fundamentalists, demanding the abolition of police oppression and the rejection of the International Monetary Fund. One of the groups that participated in the protests was the anarchist and anti-fascist collective "The Wrong Generation", which popularized among protestors the slogan "there's anger under the ground", possibly inspired by Aboul-Qacem Echebbi's poem To the Tyrants of the World.