Long kept out of politics, Iran's pampered armed forces are showing subtle signs of dropping their once total deference toward Shan Mohammad Reza Pahlavi, whose fate lies almost entirely in their hands.

Now nominally running the military government, the armed forces have withstood months of travail with a stoicism surprising to many outsiders, who feared the growing anti-shah groundswell would split their ranks.

But in the process the shah, who once was the armed forces' uncontested commander, has had to share power.

The last line of defense for those determined to keep the shah on Iran's throne is that he alone can keep the armed forces united and prevent a series of South American-style coups and political infighting in the Middle East's strategic oil regions.

The doomsday scenario sketched by many pessimists foresaw various opposition factions intriguing to maneuver their friends in the military once the shah was forced out.

Although his newly reshaped relationship with the military commanders is only beginning to emerge, according to insiders, subtle changes between the monarch and the military are taking place.

No longer do officers automatically call him his imperial majesty, shahan-shan shahan-shah (king of kings), aryamehr (light of the Aryans).

As his authority has declined in this long political crisis -- the worst he's faced in 25 years -- the shah has become just "the king" to many in the military.

The experience of a long nonpolitical armed force now have to deal with day-to-day difficulties of running the country has already sobered many officers, according to insiders.

They report that the military hierarchy has abandoned its once exaggerated confidence in its own ability to run Iran's cumbersome government administration, much of which is still on strike.

"Hopefully their difficulties in getting the country back to work has taught them they need civilians," a diplomat said.

The armed forces -- especially the ground forces, which number 220,000 to 240,000 -- have not distinguished themselves in trying to maintain law and order.

Trained for the past 27 years by an American military mission as a conventional force capable of facing a potential external enemy, Iran's troops have proven inept at the intricacies of crowd control, as the rising death toll indicates.

With disturbances in the provinces spreading, the ground troops are stretched to breaking point.

Lack of coordination among civilan police, paramilitary gendarmes and the army has furuther complicated the law-and-order problem. Moreover, the Iranian army's fire discipline is poor, with soldiers frequently firing their weapons simply to scare unruly civilians into lining up for gasoline, for example.

Specialists also worry about the potential strains the continuing disturbances are having on draftees.

Draftees make up an estimated 40 to 50 percent of the ground forces. Many serve their two-year terms near their homes, where they are subject to local opposition pressures.

So far only isolated instances of breakdown have been reported in the armed forces' tight discipline, which, by Western standards, is almost Draconian. There is no positive evidence linking the incidents to tensions between officers and enlisted men.

"Still, no army in the world can be expected to stay united in the face of such nonstop provocations," a diplomat said.

Right now Gen. Gholam Ali Azhari, the 61-year-old veteran chief of the supreme commander's staff, is said to be firmly in control as prime minister.

But were he to falter, specialists fear that Lt. Gen. Amir Hossein Rabii, about 40, the air force commander, might be tempted to take over.

Partly because of the military's long isolation from the outside world, Hossein is considered typical of a caste that, in one diplomat's words, is full of "cold, cold, cold warriors who make Adlph Hitler and Genghis Khan look like flaming liberals."

For the time being, the shah, who prides himself on being a military specialist, apparently hopes his traditional policy of generosity toward the officer corps will continue to ensure loyalty.

He has just given the armed forces a 23 percent pay increase with another 12.5 percent promised for the spring.

Nor has he been stingy on privileges. These include free medical service for up to 10 members of the family, PX privileges, food at half cost, special housing loans from the military's own bank and rents at 10 percent of pay, compared to as much as 70 percent paid by civilians.

For the shah's immediate security, a powerfully armed palace guard of about 15,000 men keeps watch in Tehran, equipped with its own armor, helicopters and artillery.

Reports abound of arms being smuggled into Tehran and leaflets explaining the details for making incendiary devices.

Whether even the guard can prove effective in the face of the apparently strong subversion remains to be seen.