Tunisia's first freely elected President, Beji Caid Essebsi, has died aged 92, the country's presidency says.
He was the world's oldest sitting president. He was admitted to hospital on Wednesday but officials did not say why he was receiving treatment.
Essebsi won Tunisia's first free elections in 2014 following Arab uprisings across the region.
He was admitted to hospital last month after suffering what officials said was a severe health crisis.
They gave no further details at the time. But Prime Minister Youssef Chahed, who visited him in hospital, urged people to stop spreading "fake news" about his condition.
Seven days of national mourning have been declared following his death. The speaker of parliament, Mohamed Ennaceur, is to take over as interim president.
Earlier this year, MEssebsi announced that he would not stand in elections expected in November.
He told a meeting of his ruling Nidaa Tounes party that someone younger should take charge. He said it was time to "open the door to the youth".
The elections will now be held before the scheduled date on 17 November, according to the country's electoral commission.
Essebsi was a former lawyer who studied and trained in the French capital Paris. During his long political career he also served as interior minister and speaker of parliament.
He rose to prominence after former Tunisian President Zine el-Abedine Ben Ali was ousted in 2011 after 23 years in office.
As president, Essebsi largely maintained stability in Tunisia. But critics said his government was too authoritarian in its response to security challenges.
Tunisia has won praise as the only democracy to emerge from the revolutions of the so-called Arab spring.
But in recent years the country has suffered attacks by Islamists and economic problems, with unemployment a persistent issue.