Officials from the international aid group said the decision is a response to the killing in June of five staff members, the danger of further attacks, and its frustration with both the U.S.-led coalition and the Afghan government.
MSF's director of operations, Kenny Gluck, told a news conference in Kabul yesterday that poor security meant the group cannot continue its work.
"Independent humanitarian action, which involves unarmed aid workers going into areas of conflict to provide aid, has become impossible," Gluck said.
Lack of security had already forced MSF to stop its work in much of Afghanistan's south and east in recent months. But prior to June, it had continued operating in 13 of Afghanistan's 34 provinces, with 80 international volunteers and 1,400 Afghan staff.
In early June, five MSF workers -- three Europeans and two Afghans -- were shot and killed in a targeted attack in the northwest Badghis Province.
Senior Afghan officials have said the man behind the killings was a local police chief who was angry because he had recently been fired. But neither he nor the alleged gunmen have been detained.
Gluck blamed the Afghan government for failing to conduct a credible investigation into the killings.
"The lack of respect for the safety of aid workers is also, unfortunately, seen in the [Afghan] government's either unwillingness or inability to provide a credible investigation of this atrocity and to provide sufficient legal follow up in terms of arrest and prosecution of those who are guilty," Gluck said.
The organization has also blamed the U.S.-led coalition for putting independent aid workers in danger.
MSF Secretary-General Marine Buissonniere yesterday accused U.S.-led forces of confusing Afghans by linking aid supplies to cooperation in identifying insurgents.
"We feel that the U.S.-backed coalition has contributed to the blurring of identities," Buissonniere charged. "The U.S.-backed has constantly sought to use humanitarian assistance and corrupt humanitarian assistance to be a support, to be a support for its military and political ambitions."
The U.S. military has admitted it distributed leaflets telling Afghans they had to provide information on militants if they wanted aid shipments to continue.
It has apologized for the act. But MSF says the damage has been done, and that many Afghans now think all aid workers are cooperating with Western troops.
In Washington, U.S. State Department deputy spokesman Adam Ereli strongly denied that the United States had ever attempted to link humanitarian aid to military operations.
"There's no basis for such a charge, there really isn't," Ereli said. "We've never conditioned our aid on cooperation with military operations. We strongly reject any allegation that our actions have made it more dangerous for humanitarian workers to assist the people of Afghanistan."
Marie-Madeleine Leplomb works for MSF in Paris. In an interview with RFE/RL, she said the coalition's use of Provincial Reconstruction Teams (PRTs) was also contributing to the danger facing aid workers.
U.S. and NATO troops are running PRTs across the country, which conduct many civilian operations that would normally be done by aid workers -- from setting up clinics to digging wells.
Leplomb said the PRTs make it nearly impossible for Afghans to understand the difference between a soldier and an independent aid worker. MSF and other aid groups depend on political neutrality to ensure their security in unstable countries like Afghanistan.
"Given the multiplication of actors, how can the [Afghan] community recognize who is a humanitarian worker and who is doing intelligence? We are not credible anymore," Leplomb said.
MSF won the Nobel Peace Prize in 1999 and works in 80 countries worldwide. It is the first major aid agency to pull out of Afghanistan since the fall of the Taliban.
Afghan Transitional Administration Chairman Hamid Karzai's office issued a statement saying it is "committed to making the country safe for aid workers" and expressing hope that MSF could return.
Gluck said the group would be eager to resume work, saying: "Afghanistan is a country where there are massive unmet medical needs."
MSF is known for working under extremely difficult circumstances, and withdrawals are rare.
Leplomb said MSF's success is built on a reputation for providing aid with no political agenda attached: "Humanitarian aid -- what we do -- is not [clearly] recognizable by the [local] communities. We [and groups like the PRTs] are all mixed in the same bag, although we have completely different mandates. [MSF's] aid is not equivocal. There is no exchange. It is free aid, without discrimination."
U.S. military spokesman Jon Siepmann told journalists in Kabul that lack of security is not an appropriate excuse to pull out of Afghanistan.
"We certainly encourage governmental and nongovernmental organizations to come here and help the Afghan people. That's what we're doing," Siepmann said. "And it's regrettable to see anyone pull out of helping the Afghan people. We don't think security is an effective excuse to do that."
More than 30 aid workers have been killed in Afghanistan since the beginning of 2003.
The international aid group Oxfam, which has about 300 staff workers in the country, said it will not pull out.
CARE, which has about 700 staff members in Afghanistan, said it will seriously consider suspending programs if its staff is directly targeted and their lives are in danger.