Rifle-toting Islamic revolutionary guards today took over the main offices of Iran's independent morning newspaper, Ayandegan, raising fears of a systematic drive by the authorities to tame the press.

The action coincided with an announcement that Iran's powerful clergy-dominated Revolutionary Council had approved a press bill, strongly criticized by writers and journalists, and passed it to the government to be put into effect.

The government's spokeman, Sadegh Tabatabai, was quoted by newspapers today as saying the new law "guarantees press freedom as well as ensuring that it is not abused."

The bill provides for jail sentences for the authors of articles judged to be insulting to leading government officials, the revolution's leader, Ayatollah Ruhollah Khomeini, Islamic beliefs, and members of the clergy and judiciary.

The new law also is said to ban publication of newspapers and magazines by anyone connected with the former monarch, Shah Mohammad Reza Pahlavi, linked in some official capacity to his government.

Two magazines that have been critical of recent developments, and whose proprietors were members of parliament under the shah, are awaiting the outcome of their applications to register ownership in new names.

Meanwhile, another morning newspaper, the leftist Peygham Emrouz, temporarily ceased publication as a precaution, and a satirical weekly paper, Ahangar, reportedly was being shut down.

Although that publication was not mentioned in official broadcasts today, the director general of the foreign press in the Ministry of National Guidance, Ali Behzadnia, told reporters that Ahangar was being closed down. The publication carries some of the most irreverent coverage of Iranian political and social developments.

Revolutionary militias took over the Ayandegan offices on orders of the public prosecutor's office. Thirteen staff members reportedly were being detained.

The charges cited against Ayandegan, according to a Voice of the Islamic Republic Radio broadcast, ranged from not observing the press law to distributing "misguided thoughts against Moslem's" publishing false news, giving false circulation figures and creating confusion and discord in the Air Force.

It was also described as having been set up with Israeli financial backing, being strongly backed by the former government and its secret police, SAVAK, and having the "indirect blessing of the deposed shah."

Meanwhile, outside Tehran, military discipline cracked today when soldiers set fire to their barracks in the northwestern town of Orumieh while protesting the court-ordered execution of two men who served in the shah's army.