The Interior Ministry said Monday that it was pulling the license of an American security firm allegedly involved in the fatal shooting of civilians during an attack on a U.S. State Department motorcade in Baghdad.

The ministry said it would prosecute any foreign contractors found to have used excessive force in the Sunday incident.

Interior Ministry spokesman Abdul-Karim Khalaf said eight people were killed and 13 were wounded when security contractors working for Blackwater USA opened fire in a predominantly Sunni neighborhood of western Baghdad.

"We have canceled the license of Blackwater and prevented them from working all over Iraqi territory. We will also refer those involved to Iraqi judicial authorities," Khalaf said.

Blackwater, based in North Carolina, provides security for many U.S. civilian operations in the country. Phone messages left early Monday at Blackwater's office in North Carolina and with a company spokeswoman were not immediately returned.

The Iraqi Interior Ministry spokesman said witness reports pointed to Blackwater involvement but said the incident was still under investigation. It was not immediately clear if the measure against Blackwater was intended to be temporary or permanent.

U.S. troops are immune from prosecution in Iraq under the U.N. resolution that authorizes their presence, but Khalaf said the exemption does not apply to private security companies.

The U.S. Embassy said a State Department motorcade came under small-arms fire that disabled one of the vehicles, which had to be towed from the scene near Nisoor Square in the Mansour district.

An embassy official provided no information about Iraqi casualties but said no State Department personnel were wounded or killed. He spoke on condition of anonymity because he was not authorized to speak to media.

He said the shooting was being investigated by the State Department's diplomatic security service, and law enforcement officials working with the Iraqi government and the U.S. military.

Prime Minister Nouri al-Maliki late Sunday condemned the shooting by a "foreign security company" and called it a "crime."

Tens of thousands of private security contractors operate in Iraq — some with automatic weapons, body armor, helicopters and bulletproof vehicles.

The contractors, including many Americans and Britons, provide protection for Westerners and dignitaries in Iraq as the country has plummeted toward anarchy and civil war.

Many have been accused of indiscriminately firing at American and Iraqi troops, and of shooting to death an unknown number of Iraqi citizens who got too close to their heavily armed convoys, but none has faced charges or prosecution.

Iraqi police said the contractors were in a convoy of six sport utility vehicles and left the scene after the shooting. A witness said the gunfire broke out following an explosion.

"We saw a convoy of SUVs passing in the street nearby. One minute later, we heard the sound of a bomb explosion followed by gunfire that lasted for 20 minutes between gunmen and the convoy people who were foreigners and dressed in civilian clothes. Everybody in the street started to flee immediately," said Hussein Abdul-Abbas, who owns a mobile phone store in the area.

The wartime numbers of private guards are unprecedented — as are their duties, many of which have traditionally been done by soldiers. They protect U.S. military operations and have guarded high-ranking officials including Gen. David Petraeus, the U.S. commander in Baghdad.

They also protect journalists, visiting foreign officials and thousands of construction projects.