Tunisian President Beji Caid Essebsi has died at 92, his office announced. Picture: Hassene Dridi/AP

Tunis - Beji Caid Essebsi, Tunisia's first democratically elected president, died on Thursday at a military hospital in the capital Tunis, after being admitted the night before.

The 92-year-old took office almost five years ago.

Essebsi died at 10:25 am (0925 GMT) on Thursday, the presidency said in a statement.

Hours later, parliamentary Speaker Mohamed Ennaceur was sworn in as interim president. The 2014 constitution states that the parliament head can take office for a maximum period of 90 days.

Ennaceur, 85, took the oath of office in the parliament's premises in Tunis due to the absence of a Constitutional Court, which would have been tasked with declaring the presidency vacant so that an interim president can take over.

The interim president in an evening speech vowed to adhere to the constitution and called for unity among the Tunisians.

Late Thursday, the Independent Electoral Commission announced that Tunisia will hold new presidential elections on September 15.

The president of the commission, Nabil Bafoun, said "the change in the date of the elections comes with the aim of adhering to the provisions of the constitution and respecting the deadlines..."

The presidential vote was originally scheduled for November 17.

A funeral for Essebsi will be held on Saturday, Tunisian Foreign Minister Khamis al-Jahnawi told the state news agency TAP.

Late last month, Essebsi was hospitalized for four days due to a severe illness. Since then, he has made few appearances in public.

He recently signed a decree to kick off procedures for legislative and presidential elections scheduled for later this year.

He looked frail in his last appearance on Monday when he met with Defence Minister Abdelkarim Zbidi.

The president's death comes as Tunisia marks Republic Day on Thursday, the 62nd anniversary of the abolition of the monarchy.

Prime Minister Youssef Chahed declared a seven-day mourning period and ordered flags at state institutions to be lowered to half-mast.

Cultural and sports events have been halted in Tunisia until further notice, TAP reported. Tunisian television stations interrupted broadcasts to air recitations from the Koran.

Condolence messages poured in following his death. Chahed mourned Essebsi and said he had "a pivotal role in the success of the democratic transition."

Rached Ghannouchi, the head of Tunisia's Islamist Ennahda movement, expressed his sorrow for Essebsi's death, saying the late president had made significant contributions to building the state.

French President Emmanuel Macron paid tribute to Essebsi as a "courageous leader who presided over his country at an essential moment in its history."

The late president had "resisted all forms of obscurantism to build the future, democracy, and progress," Macron said in a statement.

Italian Prime Minister Giuseppe Conte, on Twitter, saluted Essebsi as "a man and statesman with great political experience and humanity, who served his country throughout his life" and expressed "sincere condolences to his family and all of Tunisia."

Tunisia lost one of its most "competent" and "courageous" leaders, EU foreign policy chief Federica Mogherini said in a statement.

The upcoming presidential elections will be Tunisia's third after the 2011 uprising that toppled long-time dictator Zine El Abidine Ben Ali.

Parliamentary elections are scheduled to be held in October.

Essebsi was elected president of Tunisia in December 2014, completing a democratic transition in the country after the uprising against Ben Ali.

The North African country is widely seen as the sole democratic success story of the 2010-11 Arab Spring uprisings but has struggled with an economic slowdown and social unrest.

dpa