Pledging his support to the civilian government that has replaced Shah Mohammad Reza Pahlavi, President Carter offered yesterday to continue a strategic alliance with Iran despite the departure of the shah on Tuesday.

They have been good allies of ours and I expect this to continue in the future." Carter said at a news conference when asked about Iran. He strongly indicated his administration would continue arms deliveries and sales to the government of Prime Minister Shahpour Bakhtiar if asked to do so.

Abandoning the effusive praise he has offered for the shah over the past year, Carter sought in his comments yesterday to shore up the still unsteady Bakhtiar government installed by the shah, and to deny any suggestion of U.S. responsibility in the Iranian monarch's apparent downfall.

The president appealed to Bakhtiar's chief political opponent, Ayatollah Ruhollah Khomeini, to give Bakhtiar's government "a chance to succeed." The Moslem leader has said from his exile in France that he will shortly name a provisional Islamic government that will sweep Bakhtiar's cabinet away.

A series of other developments underscored the rapid change in Iran's political fortunes and its impact on Washington. They included:

As Carter was telling the news conference that any loss of intelligence-gathering capability in Iran would be compensated for elsewhere, U.S. sources said that highly sensitive intelligence files used for comparative purposes at monitoring stations in northern Iran had been shipped out of the country. The intelligence stations monitor Soviet military ballistic missile activity.

The State Department's top Middle East expert Assistant Secretary of State Harold Saunders, indicated to a congressional subcommittee that the United States would not oppose the election of a constitutional assembly in Iran. The assembly would presumably be empowered to erase the shah's role as a constitutional monarch.

Testifying at the same time, Assistant Defense Secretary Robert Murray said the United States has begun a review of agreements with Iran that protect the billions of dollars of worth of highly sophisticated weapons sold to the shah's government. Murray acknowledged the review had grown out of concern over the possibility that a future government, or individual Iranian soldiers, might turn over equipment to the Soviet Union.

The status of the shah's ambassador in Washington, Ardeshir Zahedi, was left in doubt. Reports from Tehran quoted a foreign ministry official as saying that Zahedi had resigned, and eight other shah loyalists heading embassies abroad were being recalled. Zahedi, out of Washington for the day, issued a statement yesterday through his office denying that he had resigned and continuing to describe himself as the shah's ambassador.

The press conference was Carter's first since mid-December and was announced as the shah was leaving Iran on a trip the monarch described as vacation but which is considered by his political opponents as permanent exile.

Carter and Saunders both steered away from discussing the prospects of the shah's settling in the United States after finishing his current trip to Egypt. The president said that "he will come later to our own country" but "we have no way to determine" how long the shah "will be out of Iran."

Pressed by members of the House International Relations subcommittee on Europe and the Middle East, Saunders' most upbeat assessment of the same prospect was that the shah's presence in the United States "need not be a dominant feature in our relations with the new government of Iran." He conceded by implication that it might create short-term problems.

A State Department spokesman said that the U.S. government would supply and pay for security for the shan while he was in the United States.

Carter's comments appeared to reflect American concern over Bakhtiar's chances for survival, which many U.S. analysts rate as no better than even because of the strong opposition from Khomeini's supporters and Bakhtiar's lack of support within the army.

Saying that the shah's "great military capabilities, police and others, couldn't completely prevent rioting and disturbances in Iran," Carter stressed several times that his administration's ability to influence events "is very limited."

"Certainly we have no desire nor ability to intrude massive forces into Iran or any other country to determine the outcome of domestic political issues... We have tried this once in Vietnam. It didn't work well, as you well know," the president told reporters.

The foreign military sales policy applied to the shah was being continued but no new sales have yet been discussed with the Bakhtiar government, the president said, adding that it was vital "that a strong and stable military be maintained" in Iran.

"I can assure the public and the Congress that no matter what happens to the specific intelligence sources in Iran, we can adequately compensate for their change and provide adequate verification for the compliance by the Soviet Union" with strategic arms limitation agreements, Carter said in response to another question.

Carter defended his assessment of a month ago that the shah would maintain power by saying "our intelligence is the best we can devise."

Criticism of the administration's intelligence-gathering and analysis in the Iranian crisis was also a constant theme in the questions directed at Saunders in the subcommittee hearing chaired by Rep. Lee H. Hamilton (D-Ind.).

The State Department, viewing the Hamilton hearings as the first major test of congressional sentiment on its handling of Iran and of the dangers that this could turn into a divisive domestic political issue, had made intensive preparations for yesterday's open session.

Hamilton noted that a lengthy opening statement delivered by Saunders "mentioned the shah only in a historical context" and seemed to "make a clear break from support for the shah." Saunders did not challenge this assessment and added that the statement had been "fully cleared at the highest levels" of the administration.

The shah will be treated by the administration as the constitutional head of state "until a constitutional decision is made by the people of Iran of another nature," Saunders said. He acknowledged that "it may well be that we've gone beyond the day that it is possible" to work wlthin the framework of the constitution that establishes the shah as a monarch, and noted that Khomeini has called for a constitutional assembly.

He declined several invitations to criticize Khomeini, saying that he did not feel it would be proper for him to discuss internal Iranian politics in the public hearing. He used the word "negotiations" twice in discussing the competing factions in Iran and gave the impression that he now hopes for an orderly bargaining process to begin to sort out the political rivalries.

No clear profile of concern emerged from the questioning by nine of the subcommittee's members. None offered any support for the shah or for the Carter administration's handling of the crisis, which was depicted by the questioners as inept.

Saunders replied to repeated expressions of concern that the administration was not doing enough to deter the Soviet Union in the region by saying the administration was mindful that "the Soviet Union would like to see us emerge with a reduced position in Iran." But he described the shah's downfall as stemming from "primarily internal dynamics."

In the most impassioned comments of the th ee hours of hearings, Rep. Gerry E. Studds (D-Mass.) asserted that the administration's support for a "cruel, brutal dictator" had caused much of the anti-Americanism now endangering Americans still in Iran. He called Saunders' statement "moral posturing" that would reduce American credibility in Iran even more.