MSF said in a statement on Thursday that it had taken the decision "in the light of the extreme risks taken in the country by humanitarian workers".
"It has become impossible for us, as an international humanitarian organisation, to guarantee an acceptable level of security for our staff, whether they are expatriates or Iraqis," said Gorik Ooms, director-general of MSF-Belgium.
"We deeply regret that we are no longer able to bring medical
aid to the Iraqi people when they need it the most," he added.
Six more foreigners were kidnapped in Iraq on Wednesday while the kidnappers of an aid worker threatened to hand her to a group allegedly led by Iraq's most wanted man, Abu Musab al-Zarqawi.
MSF's withdrawal comes just two months after it had vowed to press on with providing aid inside the country despite deteriorating security conditions and the kidnapping in September of two Italian aid workers.
It said the warring sides in Iraq have repeatedly shown "their lack of respect for independent humanitarian aid", despite the agency's strict rule not to accept any political or military interference in its emergency medical aid.
"It has become impossible for us ... to guarantee an acceptable level of security for our staff, whether they are expatriates or Iraqis"
MSF-Belgium's Director General
The aid agency set up three clinics in Baghdad's Sadr City and also provide an ambulance service in the area.
MSF said its doctors had also provided medical help and support in the cities of Najaf, Karbala and Falluja at the height of fighting in those places.
People who fled Falluja amid fierce fighting between residents and US forces also received help from the agency, it added.
United Nations agencies pulled out of Iraq last year after a car bomb attack on the UN's Baghdad headquarters in August 2003 killed 22 people.
The International Committee of the Red Cross (ICRC) also
withdrew expatriate staff from bases in all but the north of the country one year ago following a similar attack in the Iraqi