Assassins carrying submachine guns shot and killed the new Iranian government's first armed forces chief of staff today in what was immediately interpreted as a political murder.

Three unidentifed gunmen opened fire on Gen. Mohammad Vali Gharani with automatic weapons near his home in central Tehran, hitting him in the stomach and legs and wounding a bustander. Gharani, who was fired last month, was taken to a hospital as his attackers sped away on motorcycles. He died 2 1/2 hours later, government officials said.

It was the first known assassination of a major public figure since the Moslem revolutionary government took over Iran last February.

Although the assassins were unidentified and police established no motive, the unsettled atmosphere in Tehran quickly led to speculation that Gharani's killing could be the first in a surge of political terror.

Speaking on the official radio this evening, Ayotollah Mahmoud Taleghani, one of Iran's most liberal and respected clergymen, blamed the killing on "conspiracies of reaction, imperialism and elements of the previous regime."

Other expressed fear that the shooting was the work of "counterrevolutionary" interests seeking to undermine the new government and plunge Iran into civil war. In Iran's suspicion-laden politics, accusations were also likely to be leveled at the left and at ethnic minorities such as Kurds.

Gharani had a brief but controversial carrer with the new Iranian government. From the start, he was the target of criticism from radical groups, such as the Mujahedeen-e-Khalq and Cherikhaiye Fedayeen-e-khalq guerrilla organizations, for his associations with the shah.

He was fired by the government of Prime Minister Mehdi Bazargan on March 27 after only six week in office. In that time he had become involved in disputes with the Ministry of Defense over the extent of his authority and had embarrassed the government by his response to troubles in the Kurdish capital of Sanandaj.

His reaction to a siege of army barracks in Sanandaj by the Kurdish residents was to fly in a large military force that included units indentified as having belonged to the shah's former Imperial Guard. Helicopter gunships also were sent in and reportedly shot at civilians.

Although Gharani had been imprisoned by the shah for supposedly plotting a coup against him, he was widely believed to have supported the coup that brought the the shah back from his brief exile in 1953. More recent charges raised against him said he had used torture while carrying out internal security duties before the establishment of the shah's secret police, SAVAK.

In northwestern Iran, angry protest marches in the city of Tabriz this afternoon brought further evidence of factionalism growing up around Iranhs clergy. The demonstrations were sparked by a letter in yesterday's edition of a Tehran newspaper by Ayatollah Khakhali, a leader of the Islamic Republican Party, in which he was felt to have attacked Ayatollah Kazem Shariatmadari, one of the most respected of the country's spirtual leaders.

The letter appeared to be arguing in favor of a one-party state and, although it did not attack Shariatmadari by name, suggested that the Moslem People Republican Party, which has drawn many of his followers, had been infiltrated by agents of SAVAK and supporters for the shah's Rastakhiz Party.

A communique issued by the marchers in Tabriz condemned "all kinds of political monopoly seeking" and warned that those who insulted Shariatmadari should answer for it in an Islamic court.

While the political wrangles among the new rulers deepened, revolutionary courts continued prosecuting agents of the shah's dictatorship. Nine more men were executed in the Gulf town of Bandar Abbas and the northeastern holy city of Mashad.

All were charged with murder, torture or collaborating with the government of Shah Mohammad Reza Pahlavi, according to the state radio, the Voice of the Islamic Republic, Six, including a Moslem clergyman, were shot in Bndar Abbas, and three others in Mashad, the radio said. CAPTION: Picture, MOHAMMAD VALI GHARANI . . . assassination victim