The unrest was the most serious since riots in the northern city of Qazvin last August, highlighting an economic crisis that has raised discontent with the clerical regime.
Clashes broke out in Akbar Abad, a shanty town 18 miles south-west of the Iranian capital, inhabited by migrant workers. Witnesses contacted by telephone from Paris said several hundred people protested about price rises for public transport and fuel. They disarmed the police but were confronted by Revolutionary Guards, the witnesses said. "They met a barrage of bullets fired indiscriminately," one said.
A correspondent in Akbar Abad said local people claimed to have seen up to 50 people killed. They said recent price rises, which have fuelled runaway inflation, "were the last straw" for Iran's poor.
As news of the shootings spread, people from neighbouring shanty towns rushed to Akbar Abad, attacking the Revolutionary Guards and police. "Shouts of `down with the Islamic republic, down with Rafsanjani, down with Khamenei' were clearly heard," one witness said.
Iran's President, Ali Akbar Hashemi Rafsanjani, recently raised the price of oil products, despite warnings from advisers about social unrest. Fuel prices were doubled on 21 March, although most remain subsidised. Mr Rafsanjani defended the policy at prayers last Friday, saying: "we are not going for austerity.
"We know that there are many people who don't get enough nourishment," Mr Rafsanjani said. "We shall continue to support them with our policies."
The riots were only briefly reported by Iran's official media, after which the authorities imposed a news blackout. Akbar Abad was later sealed off by thousands of freshly arrived Revolutionary Guards. But clashes continued, and all shops and public offices were closed.
Meanwhile, Britain yesterday supported the United States in its attempt to stop Russia selling nuclear reactors to Iran. US officials are still trying to work out a means to persuade Moscow to abandon the deal.
The Iranian government plans to spend more than $1bn (£600m) to rebuild one reactor at the Gulf port of Bushire and to buy three more from Russia. Western experts fear the purchase could help Iran's secret nuclear weapons programme. The Iranian government insists it intends to pursue only peaceful research.
As the unrest near Tehran showed, the regime's weakest point is the conflict between its expenditure on weapons and its need to fund public subsidies.
The Russian Foreign Minister, Andrei Kozyrev, has acknowledged that Iran could divert some nuclear technology to military use. But Russia has rejected America's "grave concern" over the deal, saying it has the right to sell peaceful nuclear technology and that international controls can be exercised over the reactors.
But, Mr Kozyrev said: "It is in Russia's national interest to prevent the leak of know-how, and to prevent anyone on Russia's southern flank from obtaining nuclear weapons."