Iran's military commander declared today that the restive armed forces "will support the constitutional government" of embattled Prime Minister Shahpour Bakhtiar in the face of Islamic revolutionary forces seeking to unseat him.

With Ayatollah Ruhollah Khomeini due back Friday after 14 years of exile, determined to established an Islamic republic, the statement by Lt. Gen. Abbas Gharabaghi was seen as a gesture to support Bakhtiar's campaign to remain in office.

Gharabaghi also insisted that the armed forces will not stage a coup d'etat and expressed hope that soldiers and civilians will avoid clashes when Khomeini returns.

Despite claims that "there is not the slightest disagreement within the armed forces," Tehran newspapers reported new breaches of army discipline and foreign specialists here expressed doubts whether the commanders retain enough control over their forces to be effective in a showdown.

Troops still smarting from the departure a week ago of Shah Mohammad Reza Pahlavi rampaged through the northwestern city of Rezaiyeh and opened fire from tanks on pro-Khomeini demonstrators, according to reports.

Eight persons were reported shot dead and 33 others wounded. The city was sealed off.

Ayatollah Mahmoud Taleghani, one of Khomeini's closest aides here, said in an interview, "We do not think the army is in any position to do a coup or intervene against Khomeini."

Such is the growing credibility gap in this increasingly chaotic country that the general's remarks only added to the apprehension Iranians feel as the hour of Khomeini's return approaches.

Rumors of coups, reports of strikes on military installations keyed to demands for withdrawal of American advisers -- along with the reality of army rampages and divided loyalties -- have reached such intensity that specialists express amazement that the 440,000-man armed forces are still intact.

After a year of turmoil, strain and stress, the military specialists are unsure whether the armed forces are catable of supporting Bakhtiar if Khomeini forces the issue and attempts to implement his plan for a rival government.

In any case observers express doubt that two governments could coexist side by side for very long.

On a day of rainstorms and scattered scuffles between rival demonstrators, signs of more trouble for Bakhtiar were seen in the reported resignation of Sayed Jalaleddin Tehrani, chairman of the Regency Council. The council was set up 10 days ago to preserve the outward trappings of the monarchy after the shah left Iran last Tuesday.

In Paris on an apparent mediation effort with Khomeini for Bakhtiar, Tehrani buckled to the religious exile's demand that he resign as the price for obtaining an audience.

As the government announced it would introduce legislation soon to punish corrupt officials, two key public figures resigned -- Central Bank governor Youssef Khoshkish and Hushang Sabeti, director of the Industrial Development and Rejuvenation Organization, a government corporation designed to stimulate public sector industrial projects.

In underscoring his doubts about the army's ability to stage a coup, Ayatollah Taleghani pointedly noted that "foreigners" -- clearly meaning the United States -- "are saying they do not want to interfere and are discouraging the army a bit. So if that is the case we do not see any danger.

"The people can get armed and start an armed struggle against anyone, including the army," he said.

If Bakhtiar persists after Khomeini appoints his Islamic revolutionary council and provisional government, Taleghani indicated the opposition would prevent Bakhtiar government ministers from entering government buildings.

Whether this was only for psychological impact was unclear but Khomeini's decision to accelerate his return to Tehran before his friends here could establish close contacts with the armed forces obviously has put top military commanders under pressure that they would have preferred to avoid.

Some analysts argue that the top commanders will back almost any government rather than risk splitting their already restive troops and depriving Iran of its last remaining functioning institution. Others say that with discipline eroding -- as shown by recent army rampages in Ahwaz, Dezful and now Rezaiyeh and turmoil reported at the navy base at Bandar Abbas -- the armed forces commanders' must act while they still can.

In the week since the shah left Iran, significant numbers of junior officers and noncommissioned officers have failed to report for duty, raising questions whether the top generals can get their orders carried out, specialists said.

Deasite the failure of the military government during November and December to restore law and order or get striking workers back on the job, the top commanders are still reported to be convinced that a tough approach could correct the situation.

But after increasing fraternization between pro-Khomeini demonstrators and noncommissioned officers and men manning street patrols, serious doubts exist whether the soldiers would obey orders to shoot fellow Iranians over the fate of Bakhtiar and their generals.

In recent days, Khomeini's backers claim to have organized strikes at two air bases near the city of Hamedan south of Tehran. One key demand is withdrawal of all American technicians and advisers, whom the strikers accuse of working tor the Central Intelligence Agency.

Specialists said they did not think the opposition claims about the two bases were an "unreasonable assumption," They suggested the disturbances seriously eroded the authority of the hard-line air force commander, Gen. Amir Hossein Rabii.

The demand for withdrawal of the Americans -- who constitute roughly 90 percent of the foreign military technicians and advisers -- apparently was dictated by a desire to inherit their better paying and more prestigious jobs, a trend seen earlier in Iran in the communications and oil industries.

Specialists said the ground forces could perform adequately without foreign technicians or advisers, but the air force and navy would be "very seriously, hard hit."