Ayatollah Ruhollah Khomeini claimed today that dozens of Americans had died or been left behind in the abortive U.S. rescue operation to free the hostages in the U.S. Embassy and warned that any such action in the future would endanger the captives' lives and the world's oil supply.

Khomeini said that the mission, which was abandoned in flames in a desert about 300 miles southeast of here, proved that President Carter had "lost his mind" and his ability to govern the United States.

The militant Moslem students who have occupied the U.S. Embassy for nearly six months warned that they would kill the hostages if the United States attempted any further military action. But there was no immediate indication that any of the captives would be harmed as result of the aborted rescue effort.

A crowd of more than 10,000 people converged on the embassy this afternoon after news of the rescue attempt was broadcast here and chanted such slogans as "Death to America" and "Islam is victorious, America is destroyed!" Some members of the crowd were hostile to Western journalists present, but no injuries were reported.

Some of the estimated 200 Americans remaining in Iran were said to be concerned but not panicky about their fates after the aborted rescue mission. A few called journalist friends to ask for details of the operation, but said they had no immediate plans to leave the country. About a dozen American correspondents remain in Tehran.

Meanwhile, the militants sharply stepped up security at the embassy. Although only a handful of Iran's elite Revolutionary Guards were posted outside the compound at midday, scores surrounded the embassy after the news of the rescue attempt was announced.

[Well into the early hours of Saturday morning, there was the constant sound of aircraft around Tehran. Presumably these were Iranian Air Force planes, patrolling the capital.]

The official Pars new agency reported that Iranian Air Force planes bombed the American helicopters at their desert landing site, destroying at least two of them and damaging the others to prevent any U.S. effort to recover them.

The agency also reported that one Iranian Revolutionary Guard was killed during the bombing, but details of the incident were not explained.

Despite statements by the Iranian armed forces that its fighter planes had caused the crash of two American aircraft involved in the mission, it was apparent that the rescue attempt had caught the Iranians completely by surprise.

Various Iranian officials and government organizations issued comflicting reports on what actually happened. The state-run radio broadcast a statement from the armed forces asserting U.S. agents had fled into the desert region near the site of the failed mission and called on the local population to help security forces capture them.

But an official in the Ministry of Defense said the reports were "only a guess" and that there was no firm information that Americans were still in the area.

According to Iranian reports, the American aircraft involved in the rescue effort landed at about 2:30 a.m. today near a dirt road in the vicinity of the village of Rabat-e-Khan in Khorassan province, about 100 miles southwest of the desert town of Tabas, which was destroyed by an earthquake in 1978.

Iranian President Abol Hassan Bani-Sadr who flew over the landing site this afternoon, said that two U.S. transport planes and five helicopters were left behind.

Bani-Sadr said after his flight over the area, "It is clear that the American government that pretends to protect international law is a government that lies and has no respect for international law."

Foreign Minister Sadegh Ghotbzadeh accused President Carter of ordering the action "for election purposes." He called the rescue attempt "an act of war against Iran" and warned, "If the U.S. doesn't stop such actions we will open all the oil taps and set the region on fire."

By and large, however, Iranian government officials reacted coolly to the American rescue effort, and viewed the failure of the mission as part of an ordained victory over the United States.

As part of the expression of unconcern, Ghotbzadeh still intends to travel to Damascus, Syria over the weekend as previously scheduled, a European diplomatic source said.

The embassy captors issued a statement denouncing "Carter's disgraceful attack to free the spies." Addressed to the "militant Islamic nation of Islam," the statement said: "He sent criminal mercenaries with treacherous plans to free the hostages and commit aggression against Iran. But you have seen that God is behind the deprived Iranian masses and has sent his angels to your aid.

"We assure you that if the United States wants to commit stupid, incompetent acts, he [Carter] will have the bodies of the spies, and all his satanic agents will be buried in Iran. Be ready to combat the great Satan, then there will be no chance for the criminal Carter."

The harshest, denunciation of Carter, however, came from Khomeini himself.

In a lengthy statement read on the radio tonight, the Khomeini said Carter was "ready to commit any crime and set the whole world aflame."

Carter "does not understand what sort of nation he is facing," Khomeini said. "Our nation is a nation of blood, and our ideology is the jihad [holy war]."

Khomeini added: "For a few more years of crime and presidency, he [Carter] has sacrificed the lives of many people. He says there are eight, but everything shows there are more than that. Dozens of them lost their lives and dozens are wandering in the desert."

"Carter must know that if this group had attacked the nest of spies [Khomeini's term for the U.S. Embassy] all of them and the spies as well would have gone to hell."

Warning that "an attack on Iran is an attack on all Moslem countries," Khomeini said, "Carter must know that an attack on Iran will cut oil supplies to the whole world and mobilize the whole world against him."

Khomeini said that Carter had "decreased his political prestige to zero and ended his hopes of becoming president a second time. Carter has proved that he had lost his mind and that he is unable to run the great nation of . . . the United States."

Khomeini called on all Iranian security forces and the country's "armed 20 million" to remain on alert and "be ready to sacrifice to defend the country and Islam." He said, "I warn Carter that if he commits another stupid act we will not be able to control the youth who are not guarding the American spies, and he will be responsible for their lives."

Seizing the opportunity to blame the United States for Iran's mounting domestic problems, Khomeini said that "all the troubles in Kurdistan and the universities are related to the American military attack." He said that Iran's "mislead youth" should stop their antigovernment activities or be punished for having links with America. He was referring to serious fighting in Iran's western Kurdish region between government forces and Kurdish guerrillas and to violence on college campuses this week following a government campaign to purge them of leftists.

Earlier the day, one of the militants holding U.S. Embassy said that despite previous warnings that the captives would be killed in the event of the "slightest American military intervention," there would be "no retailiation against the hostages' because of today's rescue attempt.

"We're ready to fight the U.S. to the death, but we won't harm the hostages," the militant said. He added, however, "If the military force lands here, they [the captives] would all be executed." Asked if he meant a landing in Tehran, the student answered, "Yes."

The first word of the rescue effort was greeted with incredulity by both the captors and Iranian government officials. One of the embassy militants called the news "lies." The office of Iran's chief of armed forces joint staff, Maj. Gen. Hadi Shadmehr, when asked about the White House announcement of the aborted mission said that an investigation was being launched.

Later in the day, however, after Iranian radio reported the U.S. statement for the first time on its 2 p.m. news program, the official Pars news agency quoted Shadmehr's office as saying: "Two American military aircraft which crashed in eastern Iran Friday morning were apparently carrying CIA agents and U.S. Marines. The Marines and CIA agents had the mission of a surprise landing in the U.S. Embassy in Tehran to rescue the hostages. The two planes crashed and caught fire near the town of Tabas in eastern Iran when they were being chased by the Iranian Air Force."

Foreign Minister Ghotbzadeh told American television correspondents this afternoon that the Iranian Air Force was "involved" in the incident and that "there may have been contact between the Iranian and U.S. forces." Referring to Iranian reports that some American soldiers were left behind, Ghotbzadeh said, "I've given the order not to shoot them unless provoked." It was not immediately clear why such an order would be given by a foreign minister.

Ghotbzadeh later told an Iranian television interviewer, "The Army, the Revolutionary Guards and the Air Force are there and nobody will escape." Asked about White House spokesman Jody Powell's statement that all the Americans had been withdrawn, "Ghotbzadeh said, 'I prefer to believe our own people, not Jody Powell."

An Iranian Revolutionary Guard in Tabas told a reporter by telephone today that as many as 300 Americans wearing Iranian military uniforms had fled into the night after the incident.

The scene of the landing was a road linking Tabas with the central Iranian city of Yasd. Located in the middle of one of Iran's most remote and sparsely populated desert areas, the site lies between the Kavir-e-Lut desert stretching toward Baluchistan Providencce to the southeast and the Dashit-e-Kavir desert that spans a large portion of the eastern central Iran.

Ghotbzadeh, attributing the failure of the rescue mission to "the will of Allah," said that the action endangered the lives of the hostages and "unnecessarily" killed eight persons. But he added that "We keep cool" about it.

In the kindest remark made about President Carter by an Iranian official all day, Ghotzadeh told the Iranian television audience that "carter is a devil, but Mr. Reagan and Teddy Kennedy are even worse."