A year after it reached a bloody nadir, the country that sparked the Arab Spring is hoping for a brighter future, helped by a new constitution, a neutral government of technocrats and a lifeline thrown by international lenders.
Tunisia, the first and smallest of the Arab nations that three years ago began to overthrow their authoritarian rulers, has the best chance of them all of becoming a stable, prosperous democracy, say analysts.
But, they add, it first has to deal with entrenched economic ills and lift the curse of Islamist militancy.
Ceremonies were to be held overnight in the Carthage Presidential Palace on the outskirts of the capital, Tunis, to celebrate a constitution that, by the standards of the Arab world, is a beacon of liberalism.
Europe is singing its support, sending French President Francois Hollande and the head of the European Council, Herman Van Rompuy.
The constitution was passed into law last month by an interim legislature, the National Constituent Assembly, by 200 votes for and 12 against, after two years of bitter debate and occasional deadlock.
The process played out against a backdrop of turbulence, fuelled by high unemployment, street protests, two assassinations linked to Salafist fanatics and discord between the leading moderate Islamist party, Ennahda, and the secular opposition.
The hard-fought document spells out checks and balances in the political system, provides safeguards for freedom of religion and conscience - although liberty of expression does not apply to religious sacrilege - and protects the equality of men and women before the law and in the right to due process.
Local monitors say that, despite flaws, the charter is the product of an inclusive national debate, which brought together Tunisia's large middle class, its strong civil society groups and trade unions, and a population whose ancestry is Arabs and Berber and includes many Christians and Jews as well as the Muslimmajority.
It is also a milestone in a region where repression and exclusion are the norm, they say.
"The task was to give Tunisia an opportunity to become a democracy and we did it. We can consider from now on that Tunisia has a democratic law and a democratic constitution," Amira Yahyaoui of a grassroots group, Bawsala, which followed the Assembly's work, told the Herald.
Said political analyst Imad Mesdoua: "[The constitution] reflects some of the polarising aspects within Tunisian society, it has something to please everybody."
"You have elements to please the Islamists, elements to please the secularists who wanted to keep sharia law out of the constitution, you have a separation of powers that is enshrined. There are also some interesting aspects such as the creation of the constitutional court.
"These are victories that reflect the stark ideological contrasts that exist within the society."
Approval of the constitution paved the way for Prime Minister Mehdi Jomaa, a technocrat, to form a caretaker government of independent experts to replace the Islamist-led administration.
It will steer the country towards new presidential and parliamentary elections due before the end of the year.
Within days of Jomaa's swearing-in, the International Monetary Fund unlocked a long-delayed loan of US$506 million ($615.3 million), to support Tunisia's economy.
Decades of mismanagement and corruption under ousted president Zine Ben Ali, followed by three years of unrest, has had a crippling effect on a country that depends on tourism.
Of Tunisia's 10.8 million people, almost 40 per cent are aged under 25. Overall unemployment is just under 16 per cent, according to figures from the World Bank, although the jobless rate for young people with a university degree is around 30 per cent.
Fixing this will be a huge task, and one that the interim government is ill-placed to perform.
"The current government is supposed to be a technocrat government and not a political one, and its first job is to prepare for the elections and maintain security until elections can take place," said Khalil al-Anani of the Middle East Institute in Washington.
"It doesn't have the mandate to take harsh economic reform that can help Tunisia move forward,"
The IMF loan was put on hold after Tunisia reached the lowest, darkest point in its post-revolutionary path: on February 6 last year, leading opposition MP Chokri Belaid was shot dead at point-blank range in daylight, a shock that some feared would tip the country into civil war.
The authorities blamed the killing on a Salafist group, Ansar al-Sharia, suspected of having links to al-Qaeda. But the group has never claimed responsibility for the killing and only suspected accomplices in the act have ever been arrested.
On Tuesday, just before the first anniversary of the assassination, a leading suspect died in clashes with security forces in a raid on a house in Tunis, in which six other militants were killed, according to the Interior Ministry.
Despite nagging questions over the operation, the raid is an early sign of Jomaa's commitment to moving against jihadists, who many Tunisians see as their greatest peril. The chaos in Egypt and in neighbouring Libya is in many minds.
"It was vital to avoid the Egyptian scenario, maybe it was the most important thing," said Mesdoua.
"Even though there are different historical structures in place in Tunisia compared to Libya and Egypt, you still have the fear of the polarisation of society.
"Ennahda is not the Muslim Brotherhood but you do have radical Salafist elements in the society, they are vocal and they are present."
Said Khalil al-Anani: "Tunisia has passed the hard part of the transition and it is moving forward now to consolidate democracy.
"But you can't underestimate or underplay the security and economic challenges."