The U.N. General Assembly condemned airline hijackings today in a resolution that urged all nations to cooperate and prevent terrorists from using hostages as a means of "extorting" the release of political prisoners.

The consensus reached by the 140 nation assembly represented the strongest anti-hijacking measure put on record here.

It also symbolized the tacit endorsement of a West German military action against a recent hijacking of Lufthansa airliner. The West Germans, in cooperation with Somalia and several other countries, freed all hostages aboard the hijacked craft sitting at the Mogadishu airport in Somalia.

But the document implicitly condemned a similar action by Israel in July 1976, when Israeli commandos staged a raid at the Entebbe airport in Uganda to free hostages in a hijacked Air France airliner.

Today's resolution was adopted without a vote. Although it is [WORD ILLEGIBLE] binding, it is likely to put pressure on countries that have been granting asylum to air pirates and perhaps lead to other measures by the international community to make commercial aviation safer.

Among those who assented to today's resolution were nations that formerly provided haven for hijackers such as Algeria, Libya, and South Yemen. Only Cuba dissociated itself from the resolution.

Despite the consensus, skeptic here immediately noted that about one-half of the U.N. members have yet to ratify three existing international treaties designed to curb interference with commercial aviation.

The treaties drafted under the auspices of the International Civil Aviation Organization, were signed at Tokyo in 1963, the Hague in 1970 and Montreal in 1971.

The International Federation of Airline Pilots, which had threatened after last month's Lufthansa hijacking to stage a 48-hour worldwide strike unless the United Nations acted on the problem of air terrorism, immediately announced in a terse statement that it had decided not to "take any action at this time."

The resolution was adopted by the General Assembly not by a formal vote, but by a more unusual procedure referred to as consensus. Cuba, the sole dissenter, noted that the pilot's association had not "thought it necessary to mobilize the General Assembly" a year ago when a Cuban airliner was blown up over the Caribbean.

The U.S. representative to the General Assembly, Rep. Lester L. Wolff (D-N.Y.), welcomed the United Nations action as a "major step forward in the collective fight against hijacking."

The resolution, however, fell far short of the pilot's demands that all countries ratify the Tokyo, Hague and Montreal conventions, which would effectively eliminate safe heavens for hijackers.

"The international pilots association has been taken for a ride," Israeli Ambassador Chaim Herzog declared in a statement to the General Assembly, "The resolution is a disappointing one. It is a weak."

The resolution adopted by the General Assembly today had these elements:

It reaffirmed the U.N. condemnation of hijacking and all other acts of violence against aircraft, whether committed by individuals or states.

It called on member countries to take all necessary steps to prevent such acts, including the improvement of airport security.

It called on all countries to take joint and separate actions while respecting the sovereignty and territorial integrityof any nation, to see that the hostages are not used "as a means of extorting advantage of any kind."

It appealed to all nations who have not done so to ratify the three hijacking conventions.

Despite the unprecedented consensus, a number of delegates whose countries have traditionally given asylum to hijackers said privately that their countries had no intention of ratifying the conventions - or changing their policies.