Army troops fired submachine gun bursts into a crowd of several thousand antigovernment demonstrators here yesterday hours after the shah imposed martial law in Tehran and 11 other cities to control growing civil disorders.

Tehran's military governor said 58 persons were killed and 205 injured in the main clash near the Iranian parliament. Opposition leaders claimed, however, that the death toll reached at least 70 when the soldiers, who first fired warnings over demonstrators' heads, lowered their aim into the crowd.

The shooting marked the most violent episode in a nine-month campaign by conservative Moslem leaders to force Shah Mohammed Reza Pahlavi to slow down his attempts to impose social reforms on this rich Middle Eastern nation anchored in traditional Islam.

The shooting set off a two-hour rampage led by angry teenagers in the forefront of a street mob hurling bricks and rocks at police, with veiled women trailing behind. Several department stores and gasoline stations went up in flames.

Truckloads of Iranians troops in combat gear deployed as evening fell in Tehran. Authorities began arresting several moderate political opposition figures at their homes, although they have been largely bypassed in the more radical turn of the latest demonstrations.

By late night, a 9:00 p.m. to 5:00 a.m. curfew imposed as part of martial law appeared to be holding, although sporadic gunfire could be heard crackling in the night and tanks remained on guard at major intersections.

Diplomats expressed surprise that the shah's government did not deploy greater numbers of troops and equipment in Tehran following yesterday morning's martial law declaration. For the first time, they said, they were serious questions about his ability to rely on the army, most of which is made up of draftees.

Informed political observers said that while no one is writing off the shah yet, further mass demonstrations and opposition violence could seriously weaken his troubled monarchy and perhaps even cause the military to crumble or turn against him.

The imposition of martial law came in reply to huge anti-shah demonstrations in Tehran this week taht showed signs of gaining strength. An estimated 100,000 people marched through the streets of the capital Thursday to express their grievances in defiance of a government ban on authorized demonstrations proclaimed the day before.

The protesters were demanding return of exiled religious leader Ayatullah Ruholla Khomeini and replacement of the shah's monarchy with "an Islamic government - an ill-defined concept that roughly means a republic governed under Moslem religious influence.

While this and previous demonstrations here this week were mostly peaceful, many marchers shouted slogans such as "down with the Pahlavi dynasty" and "death to the shah."

Referring to past army fusillades against demonstrators in the months of antigovernment violence in Iran, the protesters also repeatedly chanted, "Brother soldiers, why do you kill your brothers?" and appealed to the Islamic beliefs of the troops. Thousands of women in traditional long black veils joined the chants.

The generally nonviolent nature of these demonstrations was shattered yesterday morning when a crowd of about 3,000 began a previously scheduled march in downtown Tehran. Martial law had unexpectedly been declared two hours before and troops moved in to disperse the procession. According to witnesses, the troops ordered the marchers to abandon the demonstration several times, then fired overhead and shot tear gas cannisters into the crowd. The demonstrators replied by throwing rocks at the troops and breaking nearby bank and government office windows, the witnesses said, whereupon the troops opened fire, literally moving down scores of people.

Shortly after the shooting, I saw demonstrators leaving the scene with clothes blood-soaked from helping carry away victims. A mob of mostly young Iranians stoned a bank and a post office branch from a side street as soldiers stood with bayonets fixed about 100 yards down an intersecting avenue. Black smoke rose from a fire the mob had set on the ground floor of the post office and bonfires burned in the street.

The youths collected old shoes from residents to heap on the bonfires. Women in black veils wept hysterically and men angrily shouted anti-Shah slogans.

"We only need guns," one youth screamed as he furiously slammed a piece of wood down on the street.

"This government is fascist," said a woman wrapped in her black chador, or veil. "We want an Islamic government with a religious leader like Khomeini." She referred to the Moslem leader exiled by the Shah after riots 15 years ago and now living in Iraq.

Another young man said the people were only waiting for a signal from the religious leaders to launch a full-scale revolution, although they lack weapons. "We're waiting for the religious leaders to say that, and then we will fight as hard as we can," he said. "But we can't wait much longer."

Wild rumors circulated among the local populace that the shah had brought in Israeli troops to put down demonstrations because he could no longer count on his own army. Although there was no evidence of this, it is widely believed here, mainly because many Iranians refuse to believe their compatriots are willing to fire on them and because many of the troops deployed in recent days have been seen wearing unfamiliar gas masks.

The soldiers I saw at the scene of the shooting, where sporadic automatic weapons fire was still going on, and elsewhere around Tehran were clearly Iranians.

For hours after the incident, mobs of angry demonstrators rampaged in different parts of the capital, periodically attacking banks and setting up barricades on main avenues. Several overturned cars smoldered in the middle of streets in densely populated and mainly lower class southern Tehran. Rioters set fire to a number of government-associated buildings.

Troops in army trucks patrolled streets and fired their weapons to disperse crowds, clearing away barricades when they came upon them. But they did not try to chase rioters into the warren-like back streets in the district, and they were not deployed in sufficient numbers to stop mob action.

Armored personnel carriers were stationed in front of sensitive spots such as police stations, but no tanks were visible.

"Unless the government makes a bigger show of strength, these demonstrations and riots are likely to continue and the shah may be forced to step aside," a European diplomat said.

There was speculation that the 12-day-old government of Prime Minister Jaafar Sharif-Emami did not deploy more troops because military leaders did not want to risk mutinies by some units.

This view was shared by a U.S.-trained Iranian Air Force sergeant in a street-side interview. He said he himself would disobey orders if he were told to fire on fellow Iranians. "I would sooner kill myself," he added.