Thousands of demonstrators clashed with police in the crowded bazaar section of southern Tehran yesterday, bringing to the capital the demonstrations by Moslem extremists that already have shaken much of the rest of the country.

Shah Mohammad Raza Pahlavi postponed a trip to Eastern Europe officially because of a 'cold", and canceled all his engagements for the day. A spokesman said the Shah was "not directly involved in the security action," although there were reports to the contrary.

Such large numbers of anti government demonstrators are virtually unprecedented in Iran, particularly in Tehran. Troops fired into the air and hurled hundreds of tear gas cannisters at rioters shouting "down with the shah on the capital's main street.

There were no reports of casualties in yesterday's violence in the capital, but dissidents have told of at least a dozen deaths during three days of riots have erupted in 34 cities and towns this week.

Scores of persons have been reported injured and property damage is estimated in the millions of dollars.

Before taking to the streets in Tehran yesterday, demonstrators heard two hours of speeches by turbaned Moslem religious leaders at the Jome Mosque inside the bazaar, which was ringed by troops. They exhorted followers to rise against the government.

The religious militants are demanding adherence to strict Koranic law in this predominantly Moslem nation of 35 million people. They want the government to return to the control of mosque lands that were taken under the Shah's land reform program, to close liquor stores and movie theaters and to roll back reforms allowing women into colleges and to appear in public without traditional veils.

While it is the Moslem religious leaders who are the main force behind the anti-shah agitation, many supporters of the banned Communist Party and other leftist elements have taken part in the demonstrations.

The latest wave of nationwide rioting erupted in answer to a call by religious leaders, or mullahs, for demonstrations to commemorate the deaths of persons killed in anti-government religious rioting 40 days ago. The 40th day after a death is a traditional Moslem day of mourning.

Shops in downtown Tehran were shuttered yesterday after religious leaders called on businessmen to close down or risk looting during demonstrations.

Before yesterday's violence, the state-run radio and television networks broadcast repeated warnings that the government would no longer tolerate disruptions by "a few thousand" extremists.

Karim Sanjabi, a lawyer who heads the Iranian Human Rights Committee, said scores of riot police armed with submachine guns, shields, and other anti-riot equipment were waiting outside the mosque when the demonstrators emerged.

Thousands of other persons in the crowded bazaar area were milling in the streets and the police opened fire over the heads of the crowd to scatter them, Sanjabi said. The shooting spread panic and led to a brief but fierce clash between police and the demonstrators.