Chadian President Idriss Deby has died of his injuries following battles with rebels who had been trying to oust him since 2016 and had claimed several victories last week.
He was killed in the north of Chad at the weekend, the army has announced.
Déby “breathed his last defending the sovereign nation on the battlefield”, an army general said in a statement on state TV.
The announcement came a day after provisional election results projected he would win a sixth term in office.
An army officer by training, Déby, 68, came to power in 1990 through an armed uprising. He spent three decades in power and was one of Africa’s longest-serving leaders.
The government and parliament have been dissolved. A curfew has been imposed and the borders have been shut.
A military council led by his son, a 37-year-old four-star general, will govern for the next 18 months, but “free and democratic” elections will be held once the transition period is over, the army said on Tuesday.
Deby was a long-time ally of France and other Western powers in the battle against jihadist groups in the Sahel region of Africa.
Under him, Chad worked closely with Nigeria and Cameroon in the fight against militant group Boko Haram.
Ahead of the election on April 11, he campaigned on a platform of bringing peace and security to the region, but there had been growing unhappiness over his government’s management of Chad’s oil resources.
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 the group Front for Change and Concord in Chad, known in French as Front Pour l’Alternance et La Concorde au Tchad (FACT).
Founded in 2016 by disillusioned former army officers, FACT accused Deby of repression in the run-up to the election.
On election day the group mounted an attack on a border post and advanced on N’Djamena.
The fiercest clashes began on Saturday. An army general told Reuters that 300 insurgents were killed and 150 were captured.
N’Djamena had 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. Some foreign embassies in the capital have urged their staff to leave.
There are fears Deby’s death threatens the stability of the region.
Mohammed Yahaya, the United Nations Development Programme (UNDP) Resident Representative in Nigeria told CNN: “The worst-case scenario is a Libya type of disintegration in what is a very insecure and conflict affected region.
“Chad under President Deby’s leadership put a lot of pressure on Boko Haram in the region. If there’s a disintegration we would see an increased arms flow and an emboldened Boko Haram.”