The state funeral for longtime Chadian President Idriss Deby takes place after he was killed earlier this week in a clash with rebels.
Among the foreign leaders is French President Emmanuel Macron, for whom Chad is a key ally in the fight against jihadists in the region.
He addressed his words to the coffin, saying, “You lived as a soldier, you died as a soldier with arms in hand.
“You gave your life for Chad to defend its citizens.”
Friday’s ceremony also saw a military parade and a speech by Déby’s son, General Mahamat “Kaka” Déby Itno, whom the military has appointed as the country’s new leader.
He vowed to “stay true to the memory” of his father and vowed to continue the legacy of “dialogue, forgiveness, peace, unity” for which the late president was “admired”.
After the ceremony in N’Djamena, Déby will be buried in his native region.
The military said President Déby died on Tuesday in a battle with a dissident army rebel group called Fact in the north of the country.
Other visiting heads of state included the leaders of Guinea, Mali, Mauritania and Nigeria – all of whom ignored warnings from rebels that they should not be present for security reasons.
After military honors and various speeches, a prayer will be said at the Great Mosque of N’Djamena.
Then, in the early afternoon, Mr. Déby’s remains will be airlifted to Amdjarass, a small village next to his hometown of Berdoba, more than 1000 km (600 miles) from the capital, near the Sudanese border.
News of his shocked death on Tuesday was greeted with tributes from many presidents – Frenchman Emmanuel Macron called him a “courageous friend”, Cameroonian Paul Biya said he served “tirelessly”, Felix Tshisikedi of DR Congo called it “a great loss for Chad for all of Africa”, President of Mali Bah Ndaw lamented her “brutal” death and Cyril Ramaphosa of South Africa called it “disturbing. “.
President Déby has been a key player in security strategy in the Sahel region – and Chad is renowned for having one of the best trained and best equipped armies in West Africa, fighting against the activists linked to both al-Qaeda and the Islamic State group. .
A military council headed by his son, General Mahamat Déby Itno, took power after his death.
The BBC’s Lalla Sy says he has only partial support from the military, but he is backed by the former French colonial ruler, who has a large military base in N’Djamena.
On Thursday, French Foreign Minister Jean-Yves Le Drian appeared to support the military takeover, saying the immediate priority in Chad was to ensure the country’s stability under “exceptional circumstances”.
General Déby, 37, said the military would hold democratic elections in 18 months, but opposition leaders condemned his succession as a “coup” and an army general said that many officers were opposed to the transition. A general strike was called to protest.
The rebels of fact also reject him but called for a temporary ceasefire during the funeral on Friday.
In a statement on Friday, the rebels said their command center had been bombed two days earlier in an attempt to kill their leader. Its location and details of possible victims have not been specified.
“ Military divisions mean fragile beginnings ”
Analysis by Lalla Sy, BBC News
The President of Chad was one of Africa’s oldest leaders and a close ally of the Western powers, particularly France.
The support given to President Idriss Déby – officially intended to fight rebel groups and Islamist militants in West and Central Africa – consisted of intelligence for the Chadian army, aerial surveillance, even the protection of points strategies of the Chadian army.
The presence of a foreign army is never welcomed by the local population, especially when it is military of the former colonial power.
The idea that France deliberately maintains a certain chaos in the region to defend its interests is shared by many.
But divisions within the Chadian army – which only partially support the new leader while the rebels categorically reject him – raise fears of instability as a fragile transition takes place.