The United States announced yesterday that it is taking "legal action and diplomatic steps" to close down Beirut International Airport in the first stage of its new campaign against terrorists and hijackers operating from Lebanon.

Outlining the steps, a senior State Department official said the U.S. government was terminating all services of Lebanon's Middle East Airlines between Beirut and New York immediately as well as those of American and Lebanese cargo carriers that use the Beirut airport.

Since the June 14 hijacking of TWA Flight 847, no American carriers, passenger or cargo, have used the Beirut airport. The civil war and terrorist activity swirling around the airport also have caused European and Arab carriers to suspend all but the most occasional service there.

The official said the United States was informing other governments of these steps and "encouraging them to take similar actions" to isolate the Beirut airport. He also indicated Washington was considering the termination of landing rights in the United States "of any nations whose airlines continue to fly to Lebanon."

"The purpose is to place off-limits internationally that airport until the people of Beirut put terrorists off-limits," Secretary of State George P. Shultz said last night in an interview on the "MacNeil/Lehrer NewsHour."

It was not clear how any of the measures proposed yesterday by the United States would serve to prevent hijackers who seize a plane at another airport from landing at Beirut, as occurred in the Trans World Airlines incident.

Shultz also said that the United States, working through the Justice Department, will ask that the hijackers "be identified and brought to justice, either in Beirut or elsewhere."

He said the United States knows their identities. Asked if the government will go after the hijackers, he replied, "We will." He intimated that, as a first step, the administration will seek to extradite the hijackers.

"Legal steps may or may not work. But we'll take them nonetheless," Shultz said. "Then, we'll take other steps." He characterized this approach as "not retaliation but justice," and added, "We'll have to see how we'll proceed as we go."

Earlier, national security affairs adviser Robert C. McFarlane said that the United States would not resort to "random acts of vengeance" but focus its power on "dealing with root sources of terrorism -- where people are trained, where they are housed, fed, sustained over time."

"There are two or three strategic locations in the Middle East in particular where that is the case," he said in an interview on Independent Network News.

A White House official said McFarlane was speaking of longer-term options for striking terrorist training camps in Libya, Iran and Lebanon's eastern Bekaa Valley. "If we have the opportunity to deal with it, we should," he said.

The Lebanese ambassador here, Abdallah Bouhabib, said last night that he had been instructed to deliver a formal protest to the State Department today about the U.S. measures taken to close Beirut airport.

"We think that this action is going to damage the Lebanese people and government but is not going to hurt the terrorists," Bouhabib said. "Both the government and the people of Lebanon have condemned the hijacking.

"The Lebanese government is friendly. Beirut is not the source but rather the theater for terrorism that is planned and decided outside of Lebanon. Why should Lebanon be punished?" he added.

The TWA flight was taken over by two Shiite terrorists after it left Athens en route to Rome, and was redirected to Beirut. It finally landed there, despite the original objections of airport authorities and their attempts to divert the plane elsewhere.

It was not immediately clear whether European and Arab governments would go along with the U.S. drive to shut the Beirut airport. If they do not, it would be very difficult to achieve the total isolation that U.S. officials say is aimed at bringing pressure to bear on the Lebanese government and leaders of the various militia forces to curb terrorist activities in Beirut.

There was considerable doubt last night that France, whose national carrier, Air France, owns a 28 percent interest in Middle East Airlines and which still maintains service to Beirut, would go along with such a boycott.

The French Embassy here had no comment on its government's position but noted that Vice President Bush is in Paris and is likely to take up the matter during his discussions with French officials.

Beirut airport already is almost closed, with only Middle East Airlines maintaining regular flights since the hijacking June 14. Previously there had been sporadic service by Air France, the Belgian carrier Sabena, Air Cyprus and the Soviet Union's Aeroflot.

The Jordanian airline, Alia, the last of the Arab carriers flying into Beirut, halted all flights in early June after other hijackers blew up one of its aircraft there.

The main impact of the U.S. measures is likely to fall on Middle East Airlines, which has been struggling to survive repeated closures of the airport because of factional fighting over the past several years.

The Lebanese government has a 62 percent share in Middle East Airlines, and Air France 28 percent, with the rest held by private individuals and employes. MEA, which flies throughout the Middle East and to Europe, has 7,000 employes.

Until recently, it maintained twice-weekly service between Beirut and New York, but currently has one flight a week; it was planning to suspend that flight at the end of July for a two-month period.

The Lebanese cargo carrier affected by the U.S. measure is Trans Mediterranean Airlines (TMA), which is owned by a Lebanese Christian businessman, Najib Abu Haidar. It suspended its flights to New York about a year ago.