Hundreds of Afghans staged a violent protest in Kabul on Monday against an American film mocking the Prophet Mohammed, throwing stones at a US base, torching cars and shouting "Death to America", police said.

The demonstration erupted on Jalalabad Road, home to NATO and US military bases in the eastern part of the Afghan capital, with two police cars among those set ablaze, Kabul police chief Mohammad Ayoub Salangi told AFP.

A low-budget trailer for a movie entitled "Innocence of Muslims," believed to have been produced by a small group of extremist Christians in the United States, has sparked furious anti-American protests across the Islamic world.

Gunmen from the crowd -- which Salangi said numbered around 1,000 -- opened fire at police, but no one was hurt and Salangi said he had told officers not to return fire in a bid to avoid escalating the violence.

An AFP photographer said burning tyres sent thick black smoke streaming into the sky and large stones littered the road as shopkeepers hurriedly locked up and ran away.

There was a heavy police deployment and fire fighters were quickly scrambled to try to extinguish the flames engulfing cars and storage containers owned by private businesses.

A local district police official, who gave his name only as Hafiz, said protesters threw stones at Camp Phoenix, a US-run military base in the area.

"Police drove them back from areas round the base," he said. The crowd had moved instead to the nearby Hodkhail bazaar, a few blocks from the base.

Lieutenant Colonel Hagen Masser, a spokesman for the US-led International Security Assistance Force (ISAF) said Camp Phoenix had not come under attack.

"We heard that the demonstration could turn into something more violent. But it's only in the vicinity of Camp Phoenix, so it's not an attack," he told AFP.

"We're monitoring the situation and we are ready. But it's the task of the police."

Afghanistan has a history of street protests turning violent, particularly over perceived insults to Islam, but until Monday isolated protests over the film were calm.

Riots triggered over the accidental burning of copies of the Koran, Islam's holy book, earlier this year at a US base killed around 40 people.

Heavily armed Taliban fighters on Friday stormed a strongly fortified air base in Helmand province where Britain's Prince Harry is deployed, killing two US Marines in an assault the militia said was to avenge the anti-Islam video.

Six US fighter jets, costing tens of millions of dollars, and three refuelling stations were destroyed, clocking up unprecedented material losses for the Western military in Afghanistan where they have been fighting for 10 years against insurgents.

A total of 17 people have died in violence linked to the film, including four Americans killed in Benghazi, 11 protesters who died as police battled to defend US missions from mobs in Egypt, Lebanon, Sudan, Tunisia and Yemen, and the two US soldiers in Afghanistan.