MOSCOW, DEC. 25 -- Tass, the Soviet Union's official news agency, has accused Ayatollah Ruhollah Khomeini and the Iranian government of waging war against Iraq only to preserve their power and cover up their "total incompetence" in social and economic development.

The accusation was contained in a Tass article signed by M. Krutikhin that appeared in the Dec. 19 issue of Kommunist, the Communist Party newspaper in Armenia, which arrived here by mail today.

The article called Khomeini a "fanatical and stubborn figure" but said his death would not bring the Iran-Iraq war to an end because his followers would still need a scapegoat for their own failures.

None of the major national newspapers, such as Pravda and Izvestia, reported the strongly worded denunciation. One western diplomat said the article may have been intended primarily for the southernmost republics, which are exposed to Iranian radio propaganda.

The statement could foreshadow a much tougher Soviet line against Iran, leaving the Khomeini regime even more isolated than it already is in world politics.

The Soviet Union recently has tried to play a mediator's role in the Iran-Iraq war. While it is a major arms supplier to Iraq, it has sent special delegations to Tehran in an effort to persuade the Iranians to end the seven-year-old war.

But Soviet leader Mikhail Gorbachev indicated recently that Moscow was willing to consider, for the first time, a United Nations arms embargo against Iran for refusing to comply with a U.N. Security Council cease-fire resolution.

The Tass article in the Armenian party publication said that Khomeini is primarily a figurehead who also serves as referee between warring factions of Islamic clergymen who make the day-to-day government decisions in Tehran.

"But this is what strikes the eye: in all the time since its access to power in 1979, the ruling group of the clergy {in Iran} did not manifest itself in a single constructive act of policy," Tass said.

"Total incompetence of the Iranian theologians in social and economic development was noted by researchers and analysts more than once. It is not a coincidence that Tehran officials disrupt all peace initiatives and reject, on various pretexts, all attempts at mediation in resolving the conflict with Iraq.

"The war, in this case, is a form of political existence for the theologians," Tass charged. "Apart from the bloodthirsty appeals for more sacrifices in the name of overturning a government in a neighboring country and spreading the 'Islamic revolution' to other countries, they cannot offer anything to their own people," the article said.

Even the death of the elderly Khomeini would not bring the end of the war with Iraq, Tass said, adding, "The opposite is more likely -- that the end of the war would lead to the collapse of the Islamic regime in its current form, unless, that is, it starts a new war elsewhere to distract Iranians from unresolved internal problems."

Moscow has called for a U.N. fleet in the Persian Gulf to protect shipping and replace naval task forces sent there by such countries as the United States, Britain and the Soviet Union.

While it joined with the United States and the other members of the U.N. Security Council in adopting a call for a cease-fire last summer, Moscow so far has been unwilling to support punitive measures against Iran for rejecting the resolution.