Chad’s President Idriss Déby has died of his injuries following clashes with rebels in the north of the country at the weekend, the army has said.
The announcement came a day after provisional election results projected he would win a sixth term in office.
The government and parliament have been dissolved. A curfew has also been imposed and the borders have been shut.
Mr Déby, 68, spent three decades in power and was one of Africa’s longest-serving leaders.
A military council led by Mr Déby’s son, a 37-year-old four star general, will govern for the next 18 months.
Mahamat Idriss Déby Itno will lead the council but “free and democratic” elections will be held once the transition period is over, the army said on Tuesday.
An army officer by training, Mr Déby came to power in 1990 through an armed uprising. He was a long-time ally of France and other Western powers in the battle against jihadist groups in the Sahel region of Africa.
Ahead of the election on 11 April, Mr Déby campaigned on a platform of bringing peace and security to the region.
But there has been growing unhappiness over his government’s management of Chad’s oil resources.
Mr Déby “breathed his last defending the sovereign nation on the battlefield”, an army general said in a statement read out on state TV.
He had gone to the front line, several hundred kilometres north of the capital N’Djamena, at the weekend to visit troops battling rebels belonging to a group calling itself Fact (the Front for Change and Concord in Chad).
Founded in 2016 by disillusioned former army officers, the group accuses President Déby of repression in the run-up to the election.
They built up their base in Libya in the Tibesti mountains, which straddle northern Chad and part of southern Libya.
On election day the group mounted an attack on a border post and gradually advanced on N’Djamena.
The latest clashes began on Saturday. An army general told Reuters news agency that 300 insurgents were killed and 150 were captured. Five government soldiers were killed and 36 were injured, he said. The figures could not immediately be verified.
Some foreign embassies in the capital have urged their staff to leave.
N’Djamena has come under rebel attack before and there was panic in the city on Monday, with parents taking their children home from school, when tanks were deployed along the main roads.