Prime Minister Shahpour Bakhtiar presented a new civilian Cabinet made up of little-known technocrats today as Shah Mohammad Reza Pahlavi indicated strongly that he would leave the country as soon as the new government is firmly installed.

The shah's departure, ostensibly for a vacation, would be a last-ditch effort to save his throne. But it could mean an end to his reign because a revolutionary spirit is running through Iran that might prevent his return as monarch.

The shah is far from abdication. It seems clear that he is planning to leave as part of a plan devised by Bakhtiar to restore order in the country, wracked by a year of anti-shah violence, and at the same time salvage the monarchy.

The objective is to have the shah leave Iran for an extended period while the new government cools passions and ends the chaos, then return as a constitutional monarch with limited powers.

It was not immediately clear whether the leading figure in the religious opposition, the exiled Ayatollah Ruhollah Khomeini, would attempt to subvert Bakhtiar's plan. Khomeini called the new government "illegal" today but there were no indications that he has ordered his followers to oppose it violently.

Except for anti-shah demonstrations in the holy city of Qom and similar demonstrations here marking the return of two leading newspapers closed by strikes against the military rule, Iran appeared relatively calm today as the focus shifted from the streets to the political offices.

Addressing members of Bakhtiar's new Cabinet this morning, the shah said, "As soon as your administration settles down, I will go abroad because I am so tired and I need medical attention which I may not be able to get in this country. According to the constitution, my absence may require the formation of a regency council, which will be formed."

Although different and somewhat conflicting translations of these remarks were circulating tonight, authoritative Western sources said there was no doubt that the shah is planning to leave, probably after parliament endorses the new government next week.

"The shah can't let this kind of cat out of the bag without letting it run away very quickly," one Western source said. "It's inconceivable that he won't go now."

All the translations agreed that the shah did say he was planning to take a vacation soon. Sources close to the shah said that if he does go he will not be giving up his titles or his remaining powers. They said a regency council was appointed at least once before to run the country when he was away.

But that was before the country had plummeted into chaos in a wave of strikes and riots opposing the shah's rule and before the leading political and religious opponents of the regime committed themselves to ending the monarchy.

Bakhtiar told reporters after presenting his Cabinet that the future of the shah "depends on a lot of things. I hope we can settle all these things and the disputes and misunderstandings between the king and the nation."

Asked if the monarchy could be perpetuated, he said, "I hope, I think, I pray" that it can.

The shah and his supporters are counting on that desire to retain the institution of the monarchy in some way to spread through the populace and assert itself as the Bakhtiar government takes over.

But it is precisely because Bakhitiar is working to preserve the monarchy, not end it altogether, that the country's leading opposition figures have rejected his program.

His Cabinet contains some personalities who might have modified the militant opposition six months ago and his announced platform is extremely liberal, but that is no longer enough for those who are demanding that Iran be turned into a republic.

Though six Cabinet portfolios remain to be filled, Bakhtiar has so far failed to entice into his Cabinet a single member of the leading political opposition group, the National Front, or anyone with popular credentials as a foe of the shah. By staying out of the government the National Front politicians and thoss close to the religious opposition have withheld a crucial endorsement of Bakhtiar. The issue is that he wants the monarchy and they do not.

The National Front has called for a new round of strikes on a national day of mourning it has proclaimed for Sunday in protest against the actions of the army during the past two months of martial law.

Reports of a split between the National Front and the religious opposition, hitherto united by their opposition to the shah, appeared to be confirmed when Khomeini called for a separate, religiously inspired day of mourning Monday, a day after that called by the National Front.

Sources in the religious opposition said a letter from Khomeini was read tonight at a mosque in Tehran saying that "obedience to the new ministers is against the people and against Islam."

The letter said it was the "religious duty" of government workers "not to obey them and, if they are strong enough, to prevent them from entering their ministries." It also called on the people to withhold payment of water and electric bills.

Neither the National Front nor the religious leaders, however, have called for street demonstrations or direct challenges to the army that would raise the threat of a violent attack on the new government.

Sources close to Bakhtiar say that he sent representatives to Paris to see Khomeini and asked for a few days to make his program clear before any new action is taken against him. Experienced political observers here believe that new violence would actually deter the shah from leaving the country, since he has said he would go only if order prevailed.

It is considered likely that the opposition will wait a few days to see if the shah actually departs before deciding on its next move.

If the shah does go, his opponents are expected to direct their efforts toward seeing that he does not come back, in effect challenging the basic premise of the Bakhtiar program. The opposition is deeply suspicious of the shah's real intentions, and opposition spokesmen often recall that the shah was maneuvered out of power and out of Iran in 1953, only to return stronger than ever with the help of the U.S. Central Intelligence Agency.

If the shah is still in Iran a week from now, Western diplomats and other informed sources believe there will be more violence.

Khomeini's description of the Bakhtiar government as "illegal" came in a statement published in Tehran's Persian-language newspapers this afternoon.

The newspapers went on strike to protest military censorship two months ago. Bakhtiar has promised there will be no more censorship and there was pandemonium when the first edition of the papers reappeared today.

A crowd chanting "death to the shah" surrounded the offices of Etelaat, the first paper to appear, and grabbed copies as staff members hurled them out the windows. Newsboys gave them away free and crowds formed at news stands all over town.

The banner headline said, "Peoples Revolution on Threshold of Victory." Beneath that was "Shah to Go Abroad for a Rest." The paper carried front-page pictures of Khomeini and of the late prime minister Mohammad Mossadegh, the man who maneuvered the shah off his throne 25 years ago only to lose out when the shah returned.

Khomeini's message to the newspaper workers said, "Now that the illegal government claims it has lifted censorship, you should continue your task and put an end to the strike until the nation settles its account with this illegal government.'

The reappearance of the newspapers was accompanied by the reopening of a few banks and many shops, and by the movement of the nightly curfew back from 9 p.m. to 11 p.m. as Tehran groped tentatively toward a return to normal.

Bakhtiar presented his cabinet in a ceremony that appeared on television to be low-key and a bit awkward. The shah, reading from prepared notes, addressed Bakhtiar, but the prime minister never looked directly at the shah.

The shah pledged to carry out the commitment he made in a speech in November to "reign, not rule." He said the majority of the people should participate in the country's political process and "fortunately, our constitution makes it possible, education makes it easier, human rights have made it necessary."

The Cabinet itself received mixed reviews. Some of its 14 members are virtual unknowns. Although Bakhtiar said he would not select anyone who has served in any government since the shah ousted Mossadegh, several of the members held high posts in previous administrations.

The banking community and diplomats who know him are enthusiastic about the minister of finance and economic affairs, Rostam Pirasteh. He is a banker with a reputation for hard work and leadership qualities.

The new foreign minister is Ahmad Mir-Fenereski, a career diplomat and former ambassador to the Soviet Union. He is said to have been dismissed as under secretary of the foreign ministry when he took it upon himself to allow Soviet flights carrying material to the Arabs in the 1967 Middle East war to pass through Iranian airspace.

A key appointment was that of Gen. Fereydoun Jam as minister of war. He was chief of the supreme commander's staff until dismissed by the shah in 1971 in a dispute over the limit of his authority. He is said to be a respected moderate, and his appointment leaves the moderate faction in control of the country's top military position.

Other members of the Cabinet are less well known but they include at least one former member of Tudeh, the outlawed Iranian Communist party.