A UN peacekeeping mission in Haiti that has helped maintain order through 13 years of political turmoil and catastrophe is coming to an end.
The last of the blue-helmeted soldiers from around the world are due to leave the Caribbean country next week despite concerns that the police and justice system are still not adequate to ensure security.
The United Nations lowered its flag at its headquarters in Port-au-Prince during a ceremony on Thursday that was attended by president Jovenel Moise.
After a gradual winding down, there are now about 100 international soldiers in the country and they will leave by next Sunday.
Immediately afterwards, the UN will start a new mission made up of about 1,300 international civilian police officers, along with 350 civilians who will help the country reform a deeply troubled justice system.
"It will be a much smaller peacekeeping mission," said Sandra Honore, a diplomat from Trinidad and Tobago who has served since July 2013 as the head of the mission in Haiti known as MINUSTAH.
MINUSTAH began operations in Haiti in 2004, when a violent rebellion swept the country and forced then-President Jean-Bertrand Aristide out of power and into exile.
Its goals included restoring security and rebuilding the shattered political institutions.
In April, the Security Council deemed the country sufficiently stable and voted to wind down the international military presence, which then consisted of about 4,700 troops.
Many Haitians have viewed the multinational peacekeepers as an affront to national sovereignty.
UN troops are believed to have inadvertently introduced the deadly cholera bacteria to the country and have also been accused of causing civilian casualties in fierce battles with gangs in Port-au-Prince and of sexually abusing minors.
But the mission, with additional help from the US and other nations, is also credited with stabilising the country, particularly after the January 2010 earthquake, and building up the national police force.
"The job may not be complete but they have essentially done much of what they were originally designed to do in terms of preventing any kind of armed takeover of the state, in terms of increasing the safety of civilians," said Mark Schneider, a senior adviser with the Centre for Strategic and International Studies in Washington.
"It takes work to maintain that and Haiti needs to maintain that."
MINUSTAH had already been scaling back before the Security Council voted to end the mission.
In the aftermath of the earthquake, which killed 96 UN personnel, including former head of mission Hedi Annabi, the number of troops reached more than 10,000.
But when Ms Honore arrived there were about 6,200 soldiers from around 20 countries, a figure that dropped again by nearly a third within two years.
The cholera outbreak, which started in October 2010 after peacekeepers from Nepal contaminated the country's largest river with waste from their base, killed an estimated 9,500 people and irrevocably damaged the reputation of the organisation in Haiti.
Many critics felt the UN did not adequately respond to the outbreak, something the organisation sought to later remedy.
"It was a fundamental error because it undermined the image not just of MINUSTAH, but of the international community," Mr Schneider said.