Afghanistan has formally banned eight foreign private security firms, including the controversial company formerly called Blackwater, a spokesman for President Hamid Karzai said on Sunday.

The Afghan government announced in August that it was giving security firms working in Afghanistan four months to cease operations, potentially hitting hard efforts by NATO-led troops fighting a nine-year insurgency in the country.

"The process of dissolving eight private security companies and collecting their weapons has been carried out successfully," Waheed Omer told reporters.

Xe, the former Blackwater, and White Eagle Security Services, which provides security for Afghan government officials and NGOs in particular, are among the first companies banned.

The August presidential decree ordered the 52 private security contractors operating in the country, both Afghan and international, to cease operations by January 1, 2011.

Many fear the measure could create huge problems for the military and other international entities that depend on the estimated 40,000 employees of private security contractors.

Karzai had accused the security companies of running an "economic mafia" based around "corruption contracts" favored by the international community.

He has said the firms duplicate the work of the Afghan security forces and divert much-needed resources, while Afghans criticize the private guards as overbearing and abusive, particularly on the country's roads.

Critics, though, say the tight deadline will not allow enough time to negotiate an alternative to private contractors in a country were security is a priority and police are generally not trusted.

Private security firms in Afghanistan are employed by US and NATO forces, the Pentagon, the UN mission, aid and non-governmental organizations, embassies and Western media.

They employ about 26,000 registered personnel, though experts say the real number could be as high as 40,000.

The contractors themselves have been reluctant to comment publicly but some have said privately they believe many of their clients would leave the country if they could not source their own security.

Xe, formerly Blackwater, gained notoriety in Iraq after guards protecting a convoy opened fire in a busy Baghdad square in September 2007, killing as many as 17 civilians.

Last month two former Blackwater security guards went on trial in the United States, accused of the murder of two Afghan citizens in a 2009 shooting.