Chad’s President Idriss Deby has died while visiting troops on the front line of a fight against northern rebels, an army spokesman said on Tuesday, the day after Deby was declared the winner of a sixth term in office.

Deby’s campaign said on Monday that he was headed to the front lines to join troops battling “terrorists”.

Rebels based across the northern frontier in Libya attacked a border post on election day and then advanced hundreds of kilometres south across the desert.

Deby, 68, came to power in a rebellion in 1990 and is one of Africa’s longest-serving leaders.

The cause of death was not yet clear.

Army spokesman Azem Bermendao Agouna announced his death in a broadcast on state television, surrounded by a group of military officers he referred to as the National Council of Transition.

“A call to dialogue and peace is launched to all Chadians in the country and abroad in order to continue to build Chad together,” he said.

“The National Council of Transition reassures the Chadian people that all measures have been taken to guarantee peace, security and the republican order.”

Western countries have seen Deby as an ally in the fight against extremist groups, including Boko Haram in the Lake Chad Basin and groups linked to al Qaeda and Islamic State in the Sahel.

Deby was also dealing with mounting public discontent over his management of Chad’s oil wealth and crackdowns on opponents.

His election victory had given him a sixth term in office but the April 11 vote was boycotted by opposition leaders.