An early morning traffic accident in Kabul involving a US military vehicle rapidly degenerated yesterday into the worst upheaval in the Afghan capital since the fall of the Taliban, as angry protesters burned vehicles and buildings, ransacked shops and aid agencies and hurled rocks and invective at American soldiers.

By the time the authorities imposed a rare night-time curfew in the normally peaceable capital, eight people had been killed and more than 100 injured. The upheaval was a shock to a city long considered an oasis of security, and a serious blow to the authority of the president, Hamid Karzai, who is struggling to contain an escalating insurgency in the south.

It was also an alarming day for an American military, already battling large-scale violence in Iraq and squaring up to an emboldened and nuclear-minded Iran. Now the future of Afghanistan, often trumpeted as a triumph for US foreign policy, is coming under increasing scrutiny.

Yesterday the US-led coalition said it killed up to 50 Taliban fighters in a bombing raid on a village in Helmand province, where 3,300 British troops are deploying. The air strikes took the death toll from the past two weeks to more than 350, according to the highest estimates.

The trouble in Kabul was triggered by an accident involving a US military convoy that careered through a busy Kabul intersection yesterday morning, crashing into a dozen vehicles and killing one person, according to a military statement. But accounts differed about whether American troops fired into a large crowd that gathered. A spokeswoman, Lieutenant Tamara Lawrence, said US soldiers only fired shots in the air. But a senior Kabul police office, Sher Shah Usafi, said they fired into the crowd, killing one person.

British Royal Marines, stationed in Afghanistan, rescued EU diplomats after the riots broke out. They escorted 21 people including a baby and a four-year-old child to the headquarters of the Nato-led Isaf peacekeeping force as mobs swept through the city. The marines acted after members of the European Commission to Afghanistan requested evacuation from their compound in central Kabul.

Afghan police and soldiers rapidly deployed as rioters smashed police posts, flung rocks at US Humvee troop carriers and marched on the presidential palace, some chanting "death to America!" Vehicles were set ablaze, businesses ransacked and aid agencies looted. Residents cowered inside their homes until a measure of calm returned in the late afternoon.

In a televised address last night Mr Karzai appealed to Afghans' painful memories of the country's destructive civil war in the 1990s in a call for people to "stand up" to the rioters. "These people are the enemies of Afghanistan," he said. "You should stand up against these agitators and not let them destroy our country again."

Yet the rioting reflected the simmering anger that many Afghans harbour at everything from the slow pace of reconstruction to the conspicuous wealth of foreigners in Kabul and the aggressive driving tactics of US soldiers and private security contractors in the capital.

The US says the tactics are necessary for security, but one protester, Gulam Ghaus, told the Associated Press: "Americans killed innocent people. We will not stop until foreigners leave this city. We are looking for foreigners to kill."

The disturbances spread quickly to central districts frequented by foreigners and close to American and Nato military bases. Protesters tore down a billboard poster of Mr Karzai, burned a US flag and torched the offices of the aid agency Care International. "I'm pretty shaken," said Care's director, Paul Barker, speaking to the Guardian by telephone from inside the US embassy. "About half our office has been burned and everything inside destroyed."

He said anger at the road accident may have sparked the initial trouble, but "simmering anger against foreign influence" caused the wider violence. "There's a lot of resentment against the perceived wealth of foreigners," he said. Despite $12bn (£6.5bn) in western aid since the fall of the Taliban in 2001, many Afghans are disillusioned with the government for failing to reduce poverty and restore security. The Nato-led peacekeeping force is responsible for security in Kabul, but a spokesman said Afghan troops insisted on taking the lead in quelling yesterday's violence. "The police didn't want further Isaf or coalition troops inflaming the situation," said Major Toby Jackman.

An Afghan parliamentarian, Shukria Barakzai, said some rioters appeared to be well organised. "Some had guns and handbombs," she said. "These people are taking advantage of the situation for political ends, to destroy our country again."

Anger at civilian casualties from US bomb strikes may also have fuelled the rioting. Last week the US military admitted that it killed 16 villagers during an air strike on a Taliban hideout in Kandahar province. Local human rights activists estimated the death toll as high as 34.

When American troops arrived in 2001, they aroused hopes among Afghans for an end to gnawing poverty and incessant violence. Today, many say they are bitterly disappointed

After four years and $12bn, £6.5bn, in foreign aid, the majority of Afghans still scrape through life without electricity or clean water. More than seven million people are chronically hungry, according to the UN, and 53% live on less than a dollar, or 54p, a day. The sight of foreigners earning large salaries and driving large vehicles protected by private security companies has focused frustrations. More recently, a spate of civilian deaths in US anti-Taliban bombing has aroused public anger in a country with a history of violently ejecting foreign occupiers. The government and its western backers argue that, since reconstruction started from an impossibly low base, much progress has been made. The west and north are peaceful, smooth roads stretch through the countryside, and the economy is projected to grow by 10% this year. A record number of children attend school. But faith in the Karzai government, dogged by violence in the south and allegations of corruption in Kabul, is faltering.

Many Afghans believe their $12bn in aid has been squandered or stolen.