Thousands of Chadians attended the state funeral of long-serving President Idriss Déby after he was killed earlier this week during a clash with rebels.
Among the foreign leaders there was France’s President Emmanuel Macron, for whom Chad is a key ally in the fight against jihadists in region.
He addressed his words to the casket, saying “you lived as a soldier, you died as a soldier with weapons in hand.
“You gave your life for Chad in defence of its citizens.”
The ceremony also saw a military march-past and a speech by Déby’s son, Gen Mahamat “Kaka” Déby Itno, who the army has named as the country’s new leader.
He vowed to “stay loyal to the memory” of his father and pledged to continue the legacy of “dialogue, forgiveness, peace, unity” that the late president was “admired for”.
Other visiting heads of state at Friday’s ceremony included the leaders of Guinea, Mali, Mauritania and Nigeria
After the military honours and speeches, prayers were said at the Grand Mosque of N’Djamena.
Then Mr Déby’s remains were being flown to Amdjarass, a small village next to his hometown of Berdoba, more than 1,000 km (600 miles) from the capital, near the Sudanese border.
News of his death on Tuesday was met with tributes from numerous presidents – France’s Emmanuel Macron called him a “brave friend”, Cameroon’s Paul Biya said he served “tirelessly”, DR Congo’s Felix Tshisikedi called it a “a great loss for Chad and for all of Africa”.
President Déby was a key player in security strategy in the Sahel region – and Chad is reputed for having one of the best-trained and best-equipped armies in West Africa.