The U.N. Security Council unanimously passed a resolution early yesterday condemning the "criminal massacre of Palestinian civilians in Beirut" and authorized the dispatch of 40 additional U.N. observers to join the 10 already in the city.

The U.N. resolution, in which the United States joined in the 15-to-0 approval, was passed after three hours of acrimonious floor debate and six hours of private consultations.

It requests Secretary General Javier Perez de Cuellar to consult urgently with the Lebanese government on additional ways of helping to safeguard Beirut's civilian population.

This could include the sending of U.N. troops from the 7,000-man force already serving in southern Lebanon.

Perez de Cuellar was asked to report back to the council within 48 hours.

World leaders expressed outrage at the killings of scores and perhaps hundreds of Palestinians by right-wing Christian militiamen that were discovered Saturday in the Lebanese capital.

In Moscow, the Soviet Union said the Israeli government was responsible for the killings and questioned whether Israel deserved to remain a member of the United Nations.

In an official statement distributed by the government news agency Tass, the Soviets also called for the deployment of U.N. troops in Beirut to secure an end to "Israel's aggression and genocide."

While asserting that "responsibility for the crimes rests primarily with the Israeli ruling circles," the Soviet statement also blamed the Reagan administration for having armed the Israelis and said it "in fact instigated" their actions in Lebanon, Washington Post correspondent Dusko Doder reported.

The statement compared "the carnage in Beirut" with the massacre of about 200,000 persons, mostly Ukrainian Jews, by Nazi troops at Babi Yar in 1941. Babi Yar is the name of a ravine outside Kiev where the victims were shot over a period of several months.

"What Israel is doing on Lebanese soil is genocide. Its aim is to destroy the Palestinians as a nation. Neither the Palestinians, nor other peoples, will ever forget or forgive what the aggressors have done. Retribution will be inevitable," the statement said.

"Many generations of the Israeli people themselves will have to overcome in the future the consequences of the grave crimes perpetrated today by their government."

The statement concluded, "A general question arises whether such a state as Israel, which is systematically violating principles of the U.N. Charter, can remain a member" of the United Nations.

Although the statement reflected Moscow's anger over Israel's military activities in Beirut, the Soviets appeared to use the occasion to demonstrate to the Arabs that they cannot trust the United States.

Speaking to a crowd of about 15,000 yesterday at his summer retreat south of Rome, Pope John Paul II condemned the Beirut killings as a "horrendous massacre" that showed humanity had sunk to "an excess of barbarism."

"There are reports of hundreds and hundreds of victims, babies, women and old people, put to death in a pitiless way," the pope said. "There are no words adequate to condemn such crimes that shock the human and Christian conscience.

"How can one not be seriously worried in the face of this terrible manifestation of the forces of evil and the spiral of violence expanding in the world?" the pope asked.

The pontiff also called for new talks aimed at reaching a comprehensive peace settlement in the Middle East.

In Bonn, the West German government said it was "appalled and shocked at the gruesome bloodbath" and called for a greater U.N. presence in Beirut.

British Prime Minister Margaret Thatcher, in Tokyo, condemned the killings as "barbaric."