Chad said Wednesday it had withdrawn its entire force from the Central African Republic in the wake of accusations its troops waged an unprovoked attack in a market last month.
The pullout of more than 800 troops who made up a key contingent in the African peacekeeping force MISCA struggling to restore security in the violence-ravaged country came despite French appeals for Chad to reverse its decision.
"The last soldier crossed the border on April 13," Souleyman Adam, the head of the Chadian peacekeeping unit, said at a ceremony in the southern town of Sarh, about 100 kilometres (60 miles) from the frontier.
President Idriss Deby Itno had ordered the pullout after the United Nations said Chadian troops had opened fire in a crowded market in the capital Bangui on March 29 in an attack that left around 30 people dead.
The UN Human Rights Commission said an investigation had found that the troops fired "without any provocation", claims branded defamatory by Chad.
The Chadian troops have faced repeated accusations of siding with Muslims in Central Africa's bloody sectarian conflict.
At Wednesday's ceremony, Prime Minister Pahimi Deubet Kalzeube chastised those he said were seeking to "tarnish the image of our valiant defence and security forces".
A total of 833 Chadian soldiers have returned home after a mission that left 15 of their comrades dead.
Thousands of people have been killed and many more have fled in waves of bloodshed that have convulsed the Central African Republic since a coup in March last year.
Some 8,000 foreign troops -- 2,000 from former colonial power France and most of the rest from the African MISCA force -- are trying to disarm rival militias after a year of brutal Christian-Muslim violence.
Chadian soldiers have been accused of siding with the mainly Muslim Seleka movement -- which seized power in March 2013 and held it until January this year -- and of condoning the abuses carried out by some of them against the majority Christian population.
Chad has always denied the charges, and has said it wants to keep working with its neighbour to rebuild security there.