In a new attempt to ensure release of American hostages from Beirut, the State Department issued a one-sentence statement last night pledging to support Lebanon's government, stability and security.

The statement, telephoned to reporters after 10 p.m. by officials who said they would answer no questions, appeared to respond to a plea yesterday by Shiite leader Nabih Berri for new U.S. assurances that the United States would not retaliate against Lebanon if the hostages are freed.

Berri said in Beirut that threatening comments by President Reagan in Chicago Heights, Ill., Friday had unhinged a delicate agreement for release of the hostages. He demanded new "guarantees" that the United States would not strike Lebanon.

"The United States," the State Department statement said, "reaffirms its longstanding support for the preservation of Lebanon, its government, its stability and its security, and for the mitigation of the suffering of its people."

The statement could be interpreted as repudiation of threats relayed last Tuesday by White House spokesman Larry Speakes, who said the United States might try to close Beirut airport, blockade Lebanon's ports or take other unspecified military action to retaliate for the hijacking of Trans World Airlines Flight 847 June 14.

Reagan's remarks Friday were less specific. He called terrorists and those who support them "barbarians," who "must and will be held to account."

Failure yesterday of the plan to get the hostages out of Beirut transformed a mood of near exultation that seized the White House late Friday and early yesterday into one of somber concern.

When Reagan and top aides learned late yesterday morning that the 39 remaining hostages from Flight 847 remained in Beirut, their mood changed abruptly. White House officials made brief statements to reporters, then shut down public operations to wait out the 16th day in the Mideast hijacking crisis.

Privately, U.S. officials said they believed that the agreement to free the hostages had slipped in timing rather than fallen apart. They expressed doubt whether Berri, leader of the Amal movement which apparently has control of 35 hostages, including the plane's three-man crew, could force the militant Hezbollah to free the four hostages under its control. But these American officials said they counted on Syria to use its influence to complete the release.

A diplomatic source who has remained close to the unfolding saga said the release had broken down unexpectedly because of "the four hostages Amal does not have." This source said Syria was angry about the last-minute hitch and was seeking through a combination of pressures and promises to force Hezbollah to free the hostages under its control.

Speakes said the president had conferred with national security affairs officials and remained in "close contact with all parties that are involved."

"He's obviously disappointed that the exchange they've attempted has not been completed, but he's hopeful that the situation will resolve itself," Speakes said.

Speakes made this statement at midday, eight hours after a 4 a.m. briefing in which he was heartened by what he called "reports that seem reliable" that the hostages were leaving Beirut. Speakes added, "We hope and pray that this is beginning of a journey to freedom."

At that hour officials were openly optimistic about a successful conclusion to the crisis for the first time since it began. An administration official briefing reporters in the White House told them that the hostages were expected in Damascus about 7:45 a.m. EDT where a U.S. Air Force transport was to meet them and fly them to Frankfurt, West Germany. The State Department called in several officials to inform the hostages' families by telephone as soon as the prisoners were on their way to freedom.

Vice President Bush was standing by in Geneva with instructions to fly to Frankfurt and welcome the freed hostages. Reagan was scheduled to make a 9 a.m. statement in the White House briefing room; he was reportedly prepared to express gratitude for release of the hostages tempered with concern that seven Americans held in Lebanon for as long as a year have not been freed.

Speakes said Reagan went to bed late Friday night believing that the hostages would be freed and that was still his view when he was briefed early yesterday morning by national security affairs adviser Robert C. McFarlane.

But the mood changed abruptly when it was learned that the hostages were still in Beirut. Reagan added a hasty sentence to his noon radio address on espionage, saying that "we continue to work for the release of the American hostages held in Lebanon." McFarlane, chatting briefly with reporters, appeared somber and weary. Speakes answered most questions at his midday briefing with "no comment."

When a reporter said to Speakes that his statement about "hoping the situation will resolve itself" was "passive" and asked his view of the timetable for the hostages' release, Speakes replied, "I can't predict, I can't predict."

White House officials were sensitive about Berri's charge that Reagan's fiery denunciation of terrorists as "thugs, murderers and barbarians" in Illinois on Friday was the reason for the delay of the hostages' release. Speakes declined to comment on the accusation but one source said Berri was "posturing" because of his inability to deliver Hezbollah's four hostages.

The four have been identified as Robert G. Brown, 42, of Stowe, Mass.; Richard Herzberg, 33, of Norfolk; Jeffrey Ingalls of Virginia Beach, and Robert Trautmann Jr., 37, of Laredo, Tex.

When a senior official was asked his reaction to the news that the deal had apparently foundered because Hezbollah was unwilling to release four of the hostages, he replied, "That's not a surprise. We always thought that could be a complication."

Describing the delicate attempts to bring the negotiations to fruition, this official said, "The basic terms of the situation were set long ago -- each party is engaging the credibility and endurance of the other."

Administration officials who had past dealings with Syrian President Hafez Assad expressed the view that he would find a way to prevail, whatever the obstacles, because he had given his word that the hostages would be released.

Nevertheless, Assad's relations with Hezbollah, believed to have ties to Iran, are considered dicey. Syrian relations with Iran are good on the surface, largely because Iraq is a common enemy. But Assad is much closer to Berri and Amal than to Hezbollah, and Assad is said to be wary of radical influences in the latter group.

The administration's emotional roller-coaster began about 4 p.m. Friday when word informally reached Washington of agreement to free the hostages. The White House formally learned of the deal about 6 p.m. and the State Department was processing a report from the U.S. Embassy in Damascus when informed by a television reporter shortly after 7 p.m. of the plan for release, officials said.

By 10 p.m. it had been decided that the hostages would be coming out by road to Damascus and remain there for only a few hours before being flown to Frankfurt. Speakes informed reporters at 4 a.m. yesterday that Reagan would not speak to them until the hostages had safely arrived.