Iranian religious leader Ayatollah Ruhollah Khomeini was taken yesterday from the holy city of Qom to a Tehran hospital for treatment of a heart ailment, a Reuter news agency report quoting a spokesman for Khomeini's Qom office said last night.

News of Khomeini's hospitalization followed announcements throughout the day on the state-run radio and by government officials denying growing speculation that the ayatollah, who will be 80 in May, is seriously ill.

It came as the government of Panama, where deposed shah Mohammad Reza Pahlavi lives in exile, announced that it would consider Iran's request for his extradition on receipt within 60 days of proper documentation concerning charges against him.

Panama also said the shah is "under the care of Panamanian security authorities," although it denied a claim by Iran's Foreign Minister Sadegh Ghotbzadeh that the former monarch had been arrested.

Early this month, Khomeini announced that he would be resting from Jan. 12-27 because of fatigue and overwork. Prior to the Qom announcement of his hospitalization, the state radio yesterday said the rest period has been extended an additional 15 days and that Khomeini had canceled all engagements until Feb. 7 because of fatigue and overwork. The announcement quoted Khomeini's doctors as saying his "condition is good and there is no cause for concern."

According to Reuter, Khomeini spokesman Sayed Ali Haydari said a formal announcement would be made shortly on Khomeini's transfer to the Mehdi Reza I Heart Hospital. Heydari did not specify what type or heart ailment the revolutionary leader was suffering.

Reuter said cars belonging to the Revolutionary Council, whose members reportedly visited Khomeini in Qom Tuesday, were seen driving out of the hospital gates yesterday and an ambulance bearing Qom license plates was parked at the entrance.

It was the first time Khomeini has left Qom since moving there shortly after the shah was deposed a year ago.

Meanwhile, informed sources in Panama City said they believed a statement by that government was intentionally equivocal concerning both the shah's status and the possibility that he might acutally be extradited, in order not to jeopardize what many speculate are budding negotiations between the two countries to resolve the Iranian crisis.

But the Panamanian statement, released in the form of a cable that officials said had sent to Ghotbzadeh last night, served primarily to confuse many observers.

Questions over the shah's status began Tuesday night, when Ghotbzadeh, in an interview with Iran's Pars news agency, said Panamanian President Aristides Royo had telephoned to tell him the shah was under "detention" while Panama awaited follow-up documentation on Iran's extradition request.

Royo publicly denied Ghotbzadeh's statement, and a series of official Panamanian spokesman issued reminders yesterday that Panama has on extradition treaty with Iran and that, in any case, Panamanian law prohibits extradition to any country where the death penalty is used.

Other Panamanian officials noted that Ghotbzadeh is a candidate in Iran's presidential elections Friday and indicated that the foreign minister may be trying to boost his chances in the race.

Despite Panama's early denials, Ghotbzadeh repeated his assertions that the shah was under arrest later yesterday, giving rise to an emergency Cabinet meeting in Panama and Royo's "clarifying" cable to Iran.

Panamanian sources acknowledged that Royo has spoken with Ghotbzadeh by telephone Tuesday, but said the Iranian may have "misunderstood" Royo's explanation that the shah was being "protected" by Panamanian security.

The cable listed three documents, including arrest orders, to be sent to Panama, after which "we will consider [the extradition request] a formal request, and the executive branch will begin to consider it." It closed by calling on Iran to "give an example similar to ours" in respect of international law, and to "quickly resolve the question of the liberation" of 50 American hostages held in Tehran since Nov. 4.

Ghotbzadeh and Royo have spoken a number of times by telephone, and some informed observes said the two were believed to have discussed ways to resolve the crisis. These might perhaps incluse a public airing, under Panamanian auspices, of Iran's grievances against the shah and the United States in lieu of delivering the shah himself.

Such a scenario is a variation of a proposal still under discussion in the United Nations. U.N. Secretary General Kurt Waldheim, who has suggested a U.N.-sponsored "investigation" of Iran's charges and yesterday cut short his tour of Asia to return to New York for a closed council session tentatively scheduled for Friday.

Both alternatives today were discounted and presumably would be rejected by the United States, which has maintained that the hostages must be released before any investigation could take place.

But many diplomats at the United Nations have expressed a feeling that the crisis can only be resolved by bending somewhat or at least appearing to bend, to part of Iran's demands. They believe Iran can be persuaded to settle for less than the shah's extradition.

Since the United States will not cooperate with such proposals, these diplomats feel as solution must be arrived at without direct U.S. participation or approval.