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.
An army officer by training, he 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.
Mr Déby “breathed his last defending the sovereign nation on the battlefield”, an army general said on state TV on Tuesday.
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).
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 in its statement.
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.
Chad facing an uncertain future
By Paul Melly, Africa analyst
Mr Déby has been a huge figure both in Chad and the wider region.
Under his command, the country sent forces to assist Nigeria in the campaign against Boko Haram. It has been a major player in the G5 Sahel, with troops deployed in Mali and Niger. Chad also holds a big influence over events across its southern border in the Central African Republic.
Internally, the government still appears to be in command and will seemingly be headed by Mr Déby’s son.
But the longer term outlook is uncertain. Mr Déby had just been re-elected in a contest that opponents felt was far from democratic. With this in mind, it is not clear whether his successor will be able to sustain an authoritarian system.
It is reported that Mr Déby was wounded fighting rebels in the Kanem region, just north of the capital N’Djaména. The previous bout of rebel activity had been much further north, in the Sahara and near to the border with Libya. This suggests instability has moved much further south.
There are also deep underlying political, societal and development pressures in Chad that were contained by Mr Déby’s forceful rule but certainly not resolved.
Much will depend on whether his son’s military regime will seek to develop dialogue and consensus about the way forward or try and sustain the type of constitutional strongman regime that Mr Déby built.
Founded in 2016 by disillusioned former army officers, the rebel Fact 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.
Five things about Chad:
1) It is named after Lake Chad. This is the second-largest lake in Africa, but has shrunk by 90% since the 1960s. Its basin covers parts of Nigeria, Niger, Chad and Cameroon, and is a water source for between 20 million and 30 million people.
2) The Sahara Desert roughly covers one third of the country. Much of the north is desert and home to a mere 1% of Chad’s population. The south has large expanses of wooded savannahs and woodlands.
3) Remains of a seven-million-year-old human-like creature – or hominid – known as “Toumai” were unearthed in 2001. Its discoverers argued that Toumai was the oldest hominid known to science.
4) Chad became an oil-producing nation in 2003, with the completion of a $4bn (£2.87bn) pipeline linking its oilfields to terminals on the Atlantic coast. The industry has been plagued by allegations of corruption.
5) Agriculture is the main source of livelihood for most people – cotton is grown in the south, and exported to Europe and the US.