Thousands of people gathered at the main square in Chad's capital N'Djamena on Friday to pay their respects to the late President Idriss Deby, who was killed while leading his troops against a rebel offensive on Monday.
French President Emmanuel Macron, Guinean President Alpha Conde and several other African leaders were expected to attend the funeral, despite rebel warnings they should not attend for security reasons.
Deby ruled Chad for more than 30 years and was one of Africa's wiliest political survivors, holding on to power despite rebellions that reached as far as his palace gates.
Although criticised by human rights groups for his repressive rule, he established himself as a key military ally of Western powers in the international fight against Islamist militants.
"He liberated our country from dictatorship and gave us the opportunity to participate fully in democracy," said Emmanuel Gaba, a young resident of the capital.
His death was announced by the army on Tuesday, a day after election officials said he had won a sixth term in office. Most of the opposition boycotted the vote.
"He protected us for so long that today we have come to wish him eternal rest. A deserved rest," said Hassan Adoum, who attended the ceremony.
On Thursday a car with mounted speakers drove around N'Djamena telling residents not to panic if they hear cannon fire as Deby would receive a 21-gun salute.