The deposed shah of Iran, Mohammad Reza Pahlavi, left the United States for Panama yesterday as part of a major new effort to bring about release of the American hostages in Tehran.

The shah's crisis-triggering stay ended at 8:15 a.m. as a U.S. Air Force jet took him and his entourage from Kelly Air Force Base at San Antonio, Tex., in secrecy and under heavy security.

The move was announced just before noon at the White House, where there was praise from President Carter for "the humanitarian and statesmanlike attitude" of the Panamanian government.

The departure of the shah, along with the decision by the International Court of Justice yesterday ordering release of the hostages, inaugurated a new, uncertain phase of the Iran crisis. American officials, while conceding that they have no assurances, expressed hope that the developments will improve the chances for a break in the stalemate.

The shah's departure from American soil sapped the force of the Iranian demand that Pahlavi be returned for trial in exchange for freeing the hostages.

The first reaction of the militant students at the U.S. Embassy compound in Tehran yesterday was that Pahlavi's departure will speed up the threatened espionage trials of the hostages. This reaction had been expected by Washington officials who calculated, on the basis of private soundings from Iran, that on balance the shah's departure would be more helpful than harmful. Administration officials increasingly have become convinced that the shah's departure was a prerequisite to a settlement of the crisis.

The new arrangements for the shah were negotiated by White House chief of staff Hamilton Jordan with Panama's strongman, Gen. Omar Torrijos, in secret visits to that Caribbean nation last Tuesday and Thursday. White House counsel Lloyd Cutler joined Jordan in San Antonio to present the plans and a handwritten letter of invitation from Torrijos to the former Iranian monarch.

Carter took a personal role in the arrangements by speaking by telephone to both Torrijos and the shah.

White House press secretary Jody Powell said "no quid pro quo" was requested by Panama, and none was offered by the Unted States, for providing a haven for Pahlavi.

Medical as well as political considerations were involved in the decision that the time was right for the shah to move on. Doctors who examined Pahlavi Friday at Lackland Air Force Base, where he has been since Dec. 2, reported that his lymphoma, or cancer of the lymph nodes, is spreading and that his spleen is enlarged, possibly because of malignancy.

The doctors have decided on a course of chemical therapy rather than surgery now. The plan is to begin a new round of chemotherapy treatments, under closely controlled conditions, when Pahlavi is settled in Panama.

Informed sources said Panama first offered to provide a haven for the former shah last April, when Pahlavi was in temporary residence on Paradise Island in the Bahamas. The shah's son, Crown Prince Reza Pahlavi, visited Panama to take a look, but his father ultimately chose Mexico.

The shah's arrival in New York Oct. 22 for cancer and gall bladder treatment at New York Hospital-Cornell Medical Center triggered strong protests from Iran, leading to the seizure of the U.S. Embassy by militant students Nov. 4, six weeks ago today.

From the beginning, the United States described Pahlavi's stay here as temporary, and said that he planned to leave when his medical condition permitted.

The State Department informed Iranian authorities of the move shortly before the official announcement at the White House.

In a statement released in New York through the shah's spokesman, New York publicist Robert Armao, the shah said the Iranian militants should immediately release the American hostages and launched his strongest recent attack against Iran's leader, Ayatolloh Ruhollah Khomeini. s

The statement accused Khomeini of "unconscionable and irresponsible fanning of hatred toward the United States" and called up the people of Iran to demand the release of the hostages.

After Mexico's surprise announcement Nov. 29 that Pahlavi would not be permitted to return, the State Department mounted a worldwide search for a new haven. One after another previous invitation to Pahlavi was found to be invalid or impractical, because of the passions and the physical dangers generated by the crisis.

The realistic choices boiled down to Panama or Egypt, according to officials. Despite President Anwar Sadats oft-repeated offer to receive the deposed shah, there was concern on all sides that Pahlav's presence in an Islamic country of strategic importance in the Middle East would present formidable dangers.

The decision was made at the White House a week ago that in view of Pahlavi's state of recuperation from surgery and of the mounting international pressures on Iran, the time for movement was at hand. Jordan, who had rapport with Torrijos and other Panamanian leaders because of their close liaison on ratification of the 1977 treaties returning the canal to Panama, was chosen to present the White House case.

The presidential chief of staff flew to Panama at midday Tuesday to make the case that the departure of the shah from the United States might be a step toward settlement of the crisis. Jordan's presentation also stressed U.S.-Panamanian relations, which have become more cordial since the ratification of the canal treaties.

A White House official described Torrijos' reaction as "immediate and positive . . . gracious and completely open-handed." Sources said there was no quibbling and no request for special assurances, conditions or concessions. Torrijos reportedly said he will consider the shah "an honored guest."

While officials insisted that no tangible benefit was asked or offered, there was little doubt that the gesture has created a heavy debt of gratitude from Washington and will bring immediate gains to Panama and Torrijos in public and political opinion here and in many other parts of the world. Panama is relatively invulnerable to attack from Iranian militants, with no embassy in Tehran and few direct links of any kind with that country.

When Torrijos agreed to issue an invitation to the deposed shah, Jordan telephoned Carter with the news. The president spoke briefly to Torrijos in Spanish to express his appreciation.

Jordan left Panama in the early hours Wednesday morning for San Antonio, arriving at Kelly Air Force Base about dawn. At presidential direction, White House counsel Cutler, who had played a role in arranging the earlier transfer of the shah from New York to Texas, flew from Washington to meet Jordan in San Antonio.

Late Wednesday morning Jordan and Cutler met the former shah in the visiting officers' quarters which have been his temporary home since Dec. 2. In a three-hour talk they discussed the Panamanian possibilites and other aspects of the current situation. About an hour after they left, word came from Pahlavi that he accepted Panama's invitation in principle, subject to investigation of the details by members of his entourage. p

Jordan returned to Panama early Thursday morning, accompanied by Armao and the chief of the former monarch's private security detail. They inspected the future residence for Pahlavi on secluded Contadora Island and discussed medical and security arrangements.

When Torrijos met the party Thursday afternoon, he wrote a letter in his own hand inviting the former monarch. This letter is reported to have been particularly important to Pahlavi, who continues to be a man of great pride though no longer a man of great power. It was vital to him, sources said, that he be formally inviter, rather than be treated as a refugee. s

Jordan and the shah's aides flew back to Texas Thursday night, arriving just after midnight Friday morning. The letter was presented to the shah later in the day in a meeting attended by Jordan, Cutler and Armao.

Pahlavi had chosen Mexico over Panama in the spring, and reportedly had expressed reservations about Panama. This time he was given more information, including the fact that 87 branches of international banks are in Panama and that the country has one of the highest literacy rates in Latin America. The facilities for him there also were described.

Medical clearance for the move was provided Friday by Drs. Benjamin Kean and Hibbard F. Williams of New York Hospital-Cornell Medical Center, who flew to Texas to examine Pahlavi. According to a White House statement, the doctors "advised the shah that his medical condition does not preclude his taking up residence in Panama."

Kean, whose examination of Pahlavi in Mexico two months ago at the behest of banker David Rockefeller led to the shah's admission to the United States on medical grounds, served his internship at the U.S.-sponsored Gorgas Hospital in the Canal Zone in 1937-39. Joining him in San Antonio Friday was the former physician of the U.S. Embassy in Panama, who is intimately familiar with medical resources there.

Friday afternoon Pahlavi informed the White House officials that he would be prepared to leave San Antonio for Panama at 7 o'clock the next morning (San Antonio time). After receiving this news, Jordan and Cutler called on the former monarch late in the afternoon for a final chat of more than an hour.

The shah, in the discussions with the White House officials, referred to his presence in the United States as "a problem" in connection with the Iranian hostages. He is reported to have expressed appreciation for being permitted to come to this country, despite the risks that were known at the time, and to be anxious that American lives not be endangered by his continued presence.

The White House announcement said Pahlavi will "establish residence" in Panama. Press secretary Powell declined to state what would happen if the shah should later seek to return here. Officials have suggested in the past that Pahlavi would be permitted to come back after the hostages are released and the Iranian scene has become more stable. Some American officials believe that, if his health permits, the shah ultimately would like to reside in Europe.

Despite the common notion that Pahlavi is a man of great wealth, White House officials were impressed with the smallness of his entourage and the absence of pretensions to wealth and power. At this point he has only his wife and a few aides around him, but the shah has a large number of family members and associates to support in various places of exile around the world.

Still numbered among his influential friends are David Rockefeller, board chairman of the Chase Manhattan Bank, and former secretary of state Henry A. Kissinger. Both were kept informed during the quest for a new haven for the shah but, according to White House officials, neither had a part in the Panama arrangements.

The shah and his party left their quarters at Lackland Air Force Base by automobile early yesterday morning for Kelly Air Force Base, three miles away. The latter base was closed to outsiders as a large security force assembled around an Air Force C9 jet, the military equivalent of the DC9 airliner.

A few minutes before leaving, Pahlavi received a telephone call from Carter at the White House. Officials there would not disclose what was said.

About 7:15 a.m. San Antonio time (8:15 a.m. Washington time), the shah boarded the aircraft for another in an impressive series of departures since he left Tehran for exile last Jan. 16, 11 months ago today. Since then he has resided temporarily in Egypt, Morocco, the Bahamas, Mexico, New York and San Antonio.

On arriving in Panama, Pahlavi declared he looked forward to "a wonderful sojourn" in his newest place of refuge. CAPTION: Picture, Pahlavi will begin new chemotherapy treatments after settling in Panama. Copyright (c) 1979, ABC News