The departure of the deposed shah of Iran from the United States will hasten the trials of 50 Americans who have been held captive in the U.S. Embassy here for the last six weeks, militant students holding the hostages said tonight.

"Now that the shah has gone to Panama," said a spokesman, "the trial of the hostages is inevitable."

But te news caught the students by surprise. They told the first correspondent who called them, "I don't believe you. You are lying." But once they realized that the shah had already left the United States, they reverted to their previous position and said all the hostages will be put on trial.

The students also rejected the ruling of the International Court of Justice at The Hague that they release the hostages immediately and return the embassy to U.S. control.

"The verdict of The Hague court is not important to us," a student spokesman said. "The hearing was held at America's request, and its verdict is also based on the demands of America."

The shah's departure undercuts the plan to have an international panel look into his alleged crimes and the U.S. role in Iran since the 1953 CIA-backed coup that put him in power. The panel also was to decide which of the 50 hostages should be put on trial for spying.

This international tribunal was the brainstorm of Foreign Minister Sadegh Ghotbzadeh, who earlier this week won approval for the plan from Iran's revolutionary leader, Aytollah Ruhollah Khomeini. It was viewed by diplomats here as a face-saving way for Iranian authorities to get the students to free the bulk of the American hostages without a show trial.

According to diplomats here, Ghotbzadeh was having trouble getting the commission -- which he termed a grand jury -- off the ground because few respected and independent international figures would join it while the hostages are still being held.

Ghotbzadeh, who is considered more moderate than the students, refused to comment tonight on the shah's move to Panama.

But former foreign minister Abol Hassan Bani-Sadr, who has publicly opposed the hostage taking, said tonight, "I believe that we must hold these trials."

On the surface it appears that moving the shah out of the United States will solve nothing and may make the situation worse by further infuriating the students.

Even many moderate Iranians insist that the United States is responsible for the shah wherever he is.

On the other hand, diplomatic observers here suggested tonight the possibility that the United States had received some indications through private channels from Iran that, despite the loud public protest here, moving the shah out of the United States would not further complicate the release of at least some of the hostages.

One sign that there may be some private understanding between Washington and Tehran is the generally more conciliatory statements coming from the Carter administration in recent days, most notably the White House comments earlier this week that there have been encouraging signs in efforts to get the hostages freed.

The students, however, have consistently taken a far harder line than government officials.While the students have said they will follow Khomeini's orders, the 79-year-old religious and political leader has been careful not to ask them to do anything he believes they will oppose.

There were about 100 persons standing in the rain in front of the embassy tonight shortly after the announcement of the shah's going to Panama.

Few in the crowd realized the shah had left the United States since it was not reported on Tehran radio until 11 p.m. (2:30 p.m. EST). The radio report was delivered without comment, quoting White House spokesman Jody Powell.

Earlier today, the hostages received their first shipment of Christmas mail. Students said they brought in a big box filled with hundred of Christmas cards and letters for the Americans.

More than a thousand Christmas cards for the hostages were delivered today to the hotel room of an American radio correspondent who had broadcast an appeal for holiday messages, and postal authorities here told him more are on the way.

The messages, many of them from children, are touching. One, from someone identified only as "a kid in Stamford, Conn.," said on a handdrawn card, "Just to tell you that we still care." A box in the corner of the card contained another message: "Just say in your mind, 'I'll be home soon.'"