The United States reacted with caution and relief last night to the news from Tehran that the six-day hijack of a Kuwaiti airliner ended without further bloodshed.

State Department spokesman Vivienne Ascher, saying there is "no independent confirmation" of reports that all remaining hostages were rescued, declared that "we would be thankful" if two Americans were saved.

Ascher said the government continues to believe that two others, Charles Hegna and William Stanford of the Agency for International Development, were "murdered by the hijackers."

Secretary of State George P. Shultz was informed of the reports of the hijackers' surrender shortly before making a speech in New York dealing in part with terrorism. Nonethless, Shultz stuck to his previously prepared text, saying, "The atrocity of the terrorist hijacking in Tehran continues -- a brutal challenge to the international community as well as to the most elementary standards of justice and humanity."

Aides said there is little likelihood of immediate U.S. military retaliation against the shadowy group responsible for the latest hijacking.

But the emotions aroused here by the brutality and anti-American actions of the hostage-takers, televised to American homes as a suspenseful drama reminiscent of the 1979-81 Iran hostage episode, may build support for Shultz in his campaign for using force against terrorism, officials said.

Ascher said the State Department would make no further statements until the two surviving Americans, who are unofficially reported to be AID auditor Charles Kapar and businessman John Costa, are returned to U.S custody. This suggested that U.S. officials were concerned that criticism of Iranian conduct at this point could place the survivors in new jeopardy.

Even before the Iranian news agency report yesterday afternoon that the hijackers had been overcome by security forces, there was speculation among U.S. officials that the drama might end in an "arranged surrender" that could save face for the parties.

The news that the hijackers had called for the airplane to be cleaned as their threats to blow it up reached a crescendo and then were overpowered by security men disguised as airline janitors did nothing to dampen this speculation.

On Aug. 2, in a similar situation, three Lebanese hijackers evacuated 46 hostages from an Air France jet at Tehran airport, blew up the cockpit and surrendered to Iranian authorities after a two-day standoff. Those hijackers, who had threatened to kill their hostages one by one, finally surrendered without killing any when it became clear France would not consider their demand for release of five pro-Khomeini terrorists in French jails.

On Nov. 6, in another hijack drama, Iran announced that its airport security forces "with a swift action arrested the hijackers" and released 117 passengers and 14 crew aboard a hijacked Saudi Airlines jetliner. Passengers, however, said they subdued the two hijackers before the action by the Iranians.

U.S. officials said that in both earlier cases, the hijackers apparently were set free by the Iranians after their acts of sky piracy.

The mention of the "murder" of two Americans in last night's State Department statement seemed to indicate that the United States will press for punishment of the hijackers of the Kuwaiti airliner.

The Iranian attitude toward the hijacking of the Kuwaiti airliner is reported by U.S. diplomats to have changed notably after it became clear that Kuwait was adamantly refusing the hijackers' demand for release of 17 convicted terrorists jailed for bombing the U.S. Embassy, the French Embassy and other targets in Kuwait on Dec. 12, l983.

Initially the Iranian authorities exerted pressure on Kuwait to meet the demand and seemed to give the hijackers free run of Tehran airport. U.S. sources noted that nearly all the hijackers were seen outside the Kuwaiti jetliner at one time early in the drama but that Iranian authorities did not act.

After Kuwait took a strong stand against releasing the terrorists jailed there -- and after Iran had received stiff diplomatic messages from eight to 10 noncommunist nations believed to have influence in Tehran -- the attitude of Iranian authorities seemed to shift. Iranian officials began to condemn actions of the hijackers, and there were reports they were beginning to pressure them to give up without further bloodshed.

Shultz has called repeatedly since April for the United States to pursue an "active defense against terrorism." He argued again for the use of U.S. military power yesterday at Yeshiva University in New York.