TEHRAN, Feb. 16, 1979

Less than a week after defeating the last remnants of the monarchy, Ayatollah Ruhollah Khomeini seems to be in deep trouble.

More trubulence and perhaps more major fighting appear inevitable as Iran's revolution lurches from one travail to another, now that it is deprived of the opposition to Shah Mohammad Reza Pahlavi that had unified its ranks.

The list of problems facing this exhausted nation is formidable.

The last significant contingent of foreigners needed to run sophisticated aspects of the crumbling military is preparing to leave on special emergency airlifts.

Khomeini's call for a return to work after four months of general strike faces an uncertain response even if most Iranians do show up at their jobs.

The radical left is openly challenging his once-unquestioned authority with radical demands backed up by arms.

The middle class and liberals are increasingly worried by the shape of things to come under Khomeini's promised Islamic republic. They fear they may have exchanged the shah's lay dictatorship for a theocratic one.

They were especially critical of the summary justice involved in the executions of four generals today even if few tears were shed over the victims themselves.

At stake basically is the conflict between the strongly ingrained Iranian autocratic tradition and a people without democratic roots suddenly radicalized by a year of confrontation with all forms of authority.

What has gone awry for the 78-year-old divine whose bulldozing tactics so far have swept everything and everyone before his uncompromising drive for power?

Much of the problem stems from his very success -- the need to make things work rather than simply block, frustrate and destroy an adversary.

Even so, Khomeini's first grave error occurred last weekend when military bases and arsenals were taken over by street fighters and automatic weapons by the tens of thousands handed out to anyone who wanted them.

As a result, the last functioning state institution, the military, ceased to operate -- at least temporarily -- at the very time Khomeini most needed it kept intact.

Empty barracks testified to the army's disarry and to the limits of Khomeini's power. He has appealed to all members of the armed forces to return to work Saturday, but observers doubted that his call would be heeded in full.

As predicted, it was the extreme left-wing minority -- both Marxist and Moslem -- that profited from the split between the basically conservative religious and military establishments.

The left cleverly maneuvered its own followers in the armed forces to stage large demonstrations in Tehran demanding the dissolution of the old military machine and the formation of a "peoples army."

More frightening still, the leftists made off with a sizable percentage of the arms distributed over the weekend. They have turned two Tehran universities into armed camps capable of withstanding Khomeini's assaults just as they had those of the shah's troops.

Khomeini partisans were reduced to complaining privately that the army had taken its revenge on the ayatollah by deliberately allowing the radicals to arm themselves.

The extent of the damage to the armed forces was illustrated by Khomeini's call for senior officers to travel to Tehran to confer with him but to wear civilian clothes to escape public wrath.

The attack on the American Embassy Wednesday was by all indications a sophisticated left-wing guerrilla military operation designed premarily to embarrass Khomeini and Prime Minister Mehdi Bazargan and challenge their authority. Only the previous day Khomeini had appealed to Iranians to respect all foreign missions.

The summary executions were essentially dictated by Khomeini's need to reestablish his authority.

The radical left's pointed refusal to responded to another Khomeini appeal -- to turn in its weapons -- has lead to a series of shootouts reminiscent of Beirut street fighting or the Wild West.

This obstinacy appears motivated more by real fears that Khomeini will not tolerate extreme leftist activity in his Islamic republic than by a carefully thought-out calculation that the radicals could win in any sustained fighting.

Significantly, the Tudeh Party of pro-Moscow Communists has made no such error and is openly backing Khomeini, at least for the time being.

Its calculation seems dictated by the belief that open armed confrontation with Khomeini is dangerous now. Along with some non-Marxist analysts, Tudeh leaders seem convinced that Khomeini's prestige -- at its zenith only two weeks ago upon his return from more than 14 years of exile -- is now fading and he will be a spent political force within perhaps two months.

Already observers wonder aloud whether Khomeini and the Bazargan government are strong enough to risk a major military confrontation with the left. Some analysts argue that Khoeini in any case must act now or face a rising left-wing tide, made up of Tudeh, the Marxist Peoples Guerrillas and the Islamic Mudjahiddeen.

Further down Iran's increasingly rocky road lies the familiar Third World specter of the military man on horseback, promising a restoration of law and order. Given Iran's present religious penchant he could well cloak himself in militantly Islamic colors.

Even if the army is still in tatters, it is argued that some provincial units could occupy the capital much as Mussolini seized power in his march on Rome.

The few remaining optimists still hope that the Bazargan government can right an initially unimpressive performance by getting the country back to work. That, it is argued, would be a feat which would go a long way to isolate the real extremists.

The problem is that deprived of political and trade union freedoms by the shah and his father for more than 50 years, Iranians are easily radicalized and have very high expectations.