Chad's President Idriss Deby, who ruled his country for more than 30 years and was an important Western ally in the fight against militants in Africa, has been killed on the frontline in a battle against rebels in the north.
His son, Mahamat Kaka, was named interim president by a transitional council of military officers, army spokesman Azem Bermendao Agouna said on state television.
Deby, 68, came to power in a rebellion in 1990 and was one of Africa's longest-ruling leaders, surviving numerous coup attempts and rebellions.
His death could potentially deepen Chad's problems, and those of its allies.
On the domestic front, the military is divided and the opposition bridling against years of repressive rule.
Internationally, France and the United States will be hoping that their counter-terrorism efforts are not now pushed off course. France said it had lost “brave friend” and Chad “a great soldier”.
He was killed just after he was declared winner of a presidential election that would have given him a sixth term in office. Most of the opposition boycotted the vote.
Deby — who often joined soldiers on the battlefront in his military fatigues — visited troops on the frontline on Monday after rebels based across the northern frontier in Libya advanced hundreds of km south toward the capital N'Djamena.
“Marshal Idriss Deby Itno, as he did each time that the institutions of the republic were gravely threatened, took control of operations during the heroic combat led against the terrorists from Libya. He was wounded during the fighting and died once repatriated to N'Djamena,” Bermendao said.
The government and National Assembly have been dissolved and a nationwide curfew imposed from 6pm to 5am.
“The National Council of Transition reassures the Chadian people that all measures have been taken to guarantee peace, security and the republican order,” Bermendao said.
Deby had pushed through a new constitution in 2018 that would have allowed him to stay in power until 2033. He took the title of Marshal last year and said before last week's election: “I know in advance that I will win, as I have done for the last 30 years.”
He was dealing with mounting public discontent over his management of Chad's oil wealth and crackdowns on opponents. In the election results announced on Monday, Deby claimed 79 per cent of the vote.
A Reuters reporter in N'Djamena said people were in a panic as news of his death spread, fearing that fighting could break out in the city. Many were fleeing to the outskirts and roads were jammed with traffic.
Western countries had counted on Deby as an ally in the fight against Islamist militants, including Boko Haram in the Lake Chad Basin and groups linked to Al Qaeda and IS in the Sahel.
France, the former colonial power, had based its Sahel counter-terrorism operations in N'Djamena.
Chad had announced in February the deployment of 1,200 troops to complement 5,100 French soldiers in the area.
The French presidency praised Deby fulsomely and affirmed its support for Chad's stability and territorial integrity. In a statement, it noted the formation of the interim council headed by Mahamat Kaka but said it hoped there would be a quick and peaceful return to civilian rule.
But Deby's death could mean tremendous uncertainty for Chad, said Nathaniel Powell, author of a history of French military involvement in Chad.
“The swift announcement of the establishment of a military council and naming his son Mahamat as head of state however indicates regime continuity,” Powell told Reuters.
“This probably aims to counter any coup-making efforts from within the security establishment and to reassure Chad's international partners [...] that they can still count on the country for its continued contributions to international counter-terrorism efforts in the Sahel.”
The latest rebel actions had already caused alarm in Washington and other Western capitals.
The rebel group Front for Change and Concord in Chad (FACT), which is based across the northern frontier with Libya, attacked a border post on election day and then advanced hundreds of kilometres south through the vast country.
But the Chadian military appeared to have slowed its advance about 300 km from N'Djamena.
The rebels acknowledged on Monday they suffered losses on Saturday but said they were back on the move on Sunday and Monday.
Deby had joined the army in the 1970s when Chad was engaged in a long-running civil war. He received military training in France and returned to Chad in 1978, throwing his support behind President Hissne Habr and eventually becoming commander-in-chief of the armed forces.
He seized power in 1990, leading a rebel army in a three-week offensive staged from neighbouring Sudan to topple Habre, a man accused of widespread human rights abuses.
A regional diplomat said the naming of Deby's son as interim president was problematic as the speaker of parliament should have taken power on his death.
“That in itself is a coup,” the diplomat told Reuters. “He has been grooming the son for some time. They will continue to face the rebellion. Deby had his hand in many things in the Sahel. His death disrupts things.”