Radical Islamic students today threatened to kill "at once" the 49 American hostages at the Tehran embassy and blow up its buildings if the United States attempted any military solution to the growing crisis.

In their first reaction to President Carter's decision to move naval forces into nearby waters, the students also warned that the lives of all other remaining Americans in Iran -- principally journalists -- "will be in danger" in "case of the slightest military intervention" from the United States. Western diplomats estimate there are about 300 Americans outside the embassy.

Issued after hundreds of thousands of Iranians marched past the U.S. Embassy in the largest demonstration since its occupation 17 days ago, the students' communique announced that "Islamic countries will not sit idly by in the face of aggressive measures."

"The struggling Moslem nation will defend its beloved land tooth and nail, and with the full forces of its command, destroy the enemy," the communique added, "in the case of the appearance of [U.S.] military movement in Iranian territory."

Despite such assertions, only Algeria, Libya and Syria -- for various reasons and to varying degrees -- have supported Iran in the Arab world on the hostage issue.

The communique in many respects reiterated the students' extremist threats first voiced two weeks ago. The students then said all the hostages would be killed if the United States resorted to an Entebbe-style commando operation to rescue them.

At that time, Ayatollah Ruhollah Khomeini disavowed, within 24 hours, the radical students' death threats.He said "we should not even speak of killing hostages." Now the reaction of Iran's spiritual leader is less predictable. In the meantime, he publicly has espoused the students' cause and intervened increasingly in the crisis.

Specifically, unless ousted Shah Mohammad Reza Pahlavi is extradited from the United States, Khomeini has threatened to put the remaining American hostages on trial for spying and refused to rule out the death penalty for any found guilty.

The new student communique underscored the total diplomatic impasse.

Diplomats could only hope that both sides might find it expedient to stop the growing escalation of retaliatory actions and verbal threats.

One by one, the possible avenues of compromise and face-saving seem to have been closed.

The latest disappointment here was the aborted private mission of Andrew Young, the former U.S. ambassador to the United Nations.

He is credited here with a gift for understanding the most seemingly intractable problems in the Third World without compromising American interests.

If, as is suggested here, the Young mission was canceled because of Iranian refusal to accept any formal mediation or negotiations, diplomats fear the United States was missing out on one of the few remaining approaches to an ever more sensitive Iranian government.

At this point the diplomats reasoned that face-to-face contact was more important in trying to save the hostages' lives than considerations of normal diplomatic etiquette. The American diplomatic approach got off to a poor start three days after the embassy seizure when Washington announced the ruling Revolutionary Council's acceptance of an official mission by former attorney general Ramsey Clark.

Within hours of Washington's much publicized agreement, Khomeini over-rode the Revolutionary Council and banned any formal negotiations with Clark even acting in a private capacity.

Further contributing to the gloom after the aborted Young mission was a French government statement today. The French government condemned the occupation of the embassy in terms considered stronger than those employed in a similar statement by the nine nations of the European Common Market.

Diplomats here said that such French initiative seems calculated to undermine any French go-between role at a time when no other government or party appears willing or able to fill those shoes effectively.

Meanwhile, Khomeini's office in Qom, the holy city 80 miles south of Tehran, issued a communique calling the seizure of the principal mosque in Mecca "the work of criminal hands intending to split the Moslems and paint an ugly picture of [Iran's] Islamic revolution."

Broadcast on the 2 p.m. news, the communique added "it is not unlikely for criminal U.S. imperialism to have done this in an attempt to infiltrate the tight ranks of Moslems."

It exhorted Moslems "not to lose their awareness and to expect this kind of dirty act by American imperialism and international Zionism. It is possible that Zionism, as has been pointed out many times, intends to lay the house of God open to blows and create disruptions."

The broadcast followed by less than an hour assaults on the U.S. Embassy in Pakistan by Moslem extremists and thus did not seem to have served as a pretext for the rampage in Islamabad.

In another development, Ayatollah Sadegh Khal Khali, Iran's harshest revolutionary judge, called for Nuremburg-like war crimes trials for President Carter.

Reacting to Carter's movement of naval forces, the man who as head of the revolutionary court has spent more than 60 Iranians to their deaths since the February revolution said Carter should be tried alongside CIA employes and embassy hostages described as spies.

Should Khomeini so order, he said, "I myself will preside over the court with complete impartiality."

He also called for the return to Iran -- presumably to stand trial -- of Richard Helms, the ousted shah's former Swiss prep-school classmate, CIA director and ambassador here.

In an earlier communique, the embassy students condemned the United States as "the mother of corruption of the century."

It also criticized "forging, distortion of the truth, censorship and evil propaganda, which takes place in the American media against the Iranian people and their Islamic revolution and insistently asked all the press and mass media of the world to observe the principle of honesty in disclosing the truth."