The downfall of President Zine al-Abidine Ben Ali, who resigned in January 2011 after weeks of protests and went into exile in Saudi Arabia, inspired pro-democracy activists across the Arab world.
In June 2012, Ben Ali was sentenced in absentia to life in jail for the killing of protesters in last year's revolution. Along with his wife, he had already received a sentence of 35 years in jail in June 2011.
Widespread discontent at economic hardship, decades of autocratic rule and corruption erupted into mass demonstrations in December 2010 after a young, unemployed man, Mohamed Bouazizi, set fire to himself after officials stopped him selling vegetables on the streets of Sidi Bouzid. Around 300 people died during the unrest, which led to the toppling of Mr Ben Ali.
In October 2011, the country held its first democratic parliamentary elections, with some 80 new parties registering to take part.
The moderate Islamist Ennahda party won more than 41% of the vote to secure 90 seats in the 217-member Constituent Assembly, which must draft a new constitution. Congress for the Republic (CPR) - the country's biggest secularist party - was the runner-up with nearly 14%, winning 30 seats.
Ennahda's deputy leader, Hamadi Jebali, then became prime minister of a coalition government that included the CPR and a leftist party, Ettakatol.
Ennahda, which was banned under Ben Ali, says it has modelled itself on Turkey's governing AK Party, another Muslim-majority country which has remained a secular state.
In March 2012, Ennahda confirmed that it would not seek to amend Article 1 of the 1959 Constitution to make Islamic law the main source of legislation.
One key reform enacted even before the election was the dissolution of the notorious political police and state security apparatus, which were blamed for many human rights abuses. But analysts say continuing frustration over corruption and lack of progress on the economy could pose a danger to the success of Tunisia's transition to democracy.
Since Mr Ben Ali's fall, there has also been a resurgence of hardline Islamists such as the Salafist movement, some of whom want to see Sharia law introduced to Tunisia. They have staged demonstrations against what they see to be un-Islamic influences in the country.