MSF closes operations in Somalia over 'extreme attacks'
Medical charity Medecins Sans Frontieres (MSF) is closing all its programmes in Somalia after 22 years working in the war-torn country.
It said in a statement that the decision had been taken because of "extreme attacks on its staff".
It said armed groups and civilian leaders increasingly "support, tolerate or condone the killing, assaulting, and abducting of humanitarian aid workers".
More than 1,500 staff have provided a range of services across Somalia.
The BBC's international development correspondent Mark Doyle says in many parts of Somalia the charity is the only provider of health care ranging from basic medical supplies to major surgery.
The move to close down operations completely is a shock because MSF has always been famous among the major charities as the one that would tolerate most risks to deliver aid, he says.
Unni Karunakara, MSF's international president, said leaving Somalia had been one of the hardest decisions MSF had ever had to make.
Since 1991, when Somalia descended into civil war, 16 MSF workers have been killed and there had been dozens of attacks on its staff, ambulances and medical facilities, the charity said.
Last month, two of its Spanish members of staff who were kidnapped from a Kenyan camp for Somali refugees and held captive in Somalia for nearly two years were freed.
"Ultimately, civilians in Somalia will pay the highest cost," Dr Karunakara said in a statement.
"Much of the Somali population has never known the country without war or famine," he said.
"In choosing to kill, attack, and abduct humanitarian aid workers, these armed groups, and the civilian authorities who tolerate their actions, have sealed the fate of countless lives in Somalia."
Correspondents say this will be a blow to the government of President Hassan Sheikh Mohamud, which has been trying to build on the improving security in the capital, Mogadishu, in the last two years.
Some 18,000 African Union troops are in the country supporting his administration - the first one in more than two decades to be recognised by the US and the International Monetary Fund (IMF).
The Islamist al-Shabab militant group no longer has bases in Mogadishu and has also been pushed out of other cities.
But it remains in control of smaller towns and large swathes of the countryside in central and southern Somalia and continues to launch occasional suicide attacks.
The improving security situation has prompted the return of diaspora Somalis and allowed UN agencies and foreign embassies to reopen.
However, in June, 15 people, including four foreigners, were killed in an assault on a heavily guarded UN office in Mogadishu.
The MSF pull-out will affect all of Somalia, including the semi-autonomous region of Puntland and the breakaway republic of Somaliland.
The group said that Somalia was the only country in which it has operated where it has had to "take the exceptional measure of utilising armed guards".
MSF workers can intervene only if their presence is accepted by all warring parties and communities and only if those groups agree to respect the safety of patients and humanitarian staff.
"This acceptance, always fragile in conflict zones, no longer exists in Somalia today," the MSF statement said.