Israel's two chief rabbis differed publicly today on whether Jewish tradition permits the return of the occupied Arab lands captured in the 1967 war.

Ashkenazi chief Rabbi Shlomo Goren was reported to be "shocked" by a ruling handed down by his colleague, Sephardic chief Rabbi Ovadia Yosef, that territories taken by Israel in war may be returned in exchange for a true peace.

Rabbi Goren was unavailable for direct comment because he was on a tour of the occupied Golan Heights of Syria, an aide said.

Most Israelis living in the occupied West Bank of the Jordan River, whether Sephardic or Ashkenasi, are Orthodox Jews who believe the region is part of biblical Israel. They argue for Jewish settlement there on that basis.

The Ashkenasi Israelis are Jews of European origin while the Sephardics' origins are mostly in the Middle East or North Africa.

Yosef gave his ruling during a speech Monday at a Jerusalem conference on the interpretation of the Torah.

"The motive for my addressing the question was my strong desire to prevent war," Rabbi Yosef said in a telephone interview.

He recalled his experience as head of a rabbinical council that gave religious permits for widows of soldiers missing in action to remarry after the Yom Kippur war.

"I saw how much pain and suffering is caused in Israel's wars," Yosef said. "For many nights I couldn't close my eyes after hearing those terrible tragic stories. Who then could declare that one must not hand over territories if he thus reduces the chance for peace."

Goren told reporters that Jewish traditional law, the Halacha, "prohibits returning any territories of Eretz Yisrael (the Land of Israel) even if they are in cases where lives are in danger if they are not handed over."

But Yosef countered, "We must do everything in our power to stop war. I have consulted with other Torah scholars, and they all agreed with me."

He stressed that only the government can make the actual decision to withdraw from the occupied territories.

Meanwhile, in the fighting to the north, Lebanese state radio reported that a 40-man Israeli armored unit punched into the southern Lebanese city of Baraachit and blew up two houses during a search for Palestinian guerrillas.

In Tel Aviv, an Israeli Army statement said the attack left an Israeli officer dead and two soldiers wounded. The statement said the houses that were blown up contained supplies of guerrilla weapons.

The Beirut radio said Israeli jets flew over the area, and there was sporadic shelling from the border, about 6 miles to the south.