JERUSALEM (AP) _ Israeli helicopter gunships rocketed command centers of Palestinian leader Yasser Arafat's movement in the West Bank and Gaza Strip overnight in retaliation for the slayings of two Israelis, presumably by Palestinians.

In the wake of the tough response, Israeli Prime Minister Ehud Barak worked Tuesday to build a political alliance with the ultra-Orthodox Shas party, while prospects faded for a partnership with the hawkish Likud faction.

For several weeks, Barak had sought to bring Likud leader Ariel Sharon into his crumbling minority government. Contacts broke down Monday night, after the prime minister refused to grant Likud a veto right over future peace talks.

An angry Sharon said Barak could no longer be trusted.

``Apparently, he is not fit to lead the country,'' said Sharon, whose Sept. 28 visit to a contested Jerusalem shrine was cited by the Palestinians as a trigger for Israeli-Palestinian fighting.

Since that day, 143 people, the vast majority Palestinians, have been killed in gun battles and rock-throwing clashes.

Israel unleashed its helicopter gunships late Monday, in retaliation for a deadly shooting attack on an Israeli security guard in an Arab area of Jerusalem, and the stabbing death of an Israeli resident of the city's Jewish neighborhood of Gilo.

Arafat said the helicopter raids would not shake the resolve of young Palestinian activists, ``these children who throw the stones to defend Jerusalem, the Muslims and the holy places.''

In Nablus, the largest West Bank town, Palestinians shot in the air as they heard the roar of helicopter engines, but failed to prevent the gunships from sending two missiles into the Fatah office in the city.

Israeli machine gun fire also damaged the temple and offices of the biblical Samaritans, followers of an offshoot of Judaism. About 600 Samaritans live in two communities, one in Israel and one in Nablus.

Samaritan leaders said Israeli troops were aware of the location of the shrine when they opened fire. ``This is a sacred place and they should respect it,'' said temple caretaker Fathi Abu Hassan.

Col. Raanan Gissin, a spokesman for the Israeli army, said Israel fired warning shots first in order not to injure civilians.

Gunships also strafed Fatah offices in the West Bank town of El Bireh, injuring five people, witnesses said. Israeli aircraft also flew over the Gaza Strip, hitting command outposts belonging to Force 17, Arafat's elite bodyguard unit, and Fatah offices in the towns of Khan Yunis and Rafah.

Barak's chief police adviser, Danny Yatom, said the rocket attacks were intended as a warning to Fatah, whose gunmen have taken the lead in shooting attacks on Israeli targets. ``We are trying to signal to the Palestinians that we know who is responsible,'' Yatom told Israel army radio Tuesday.

Monday night's attack was one of the most intense in 34 days of fighting.

The Israeli military has said it is changing tactics and going on the offensive against Palestinian gunmen, deploying special units trained in guerrilla warfare.

Deputy Defense Minister Ephraim Sneh said Israel officials ``do not want to broaden and deteriorate the conflict,'' but instead seek to restore calm and return to the negotiating table.

``What we are doing in the battlefield right now stems from this strategic goal,'' he said.

Israel's chief peace negotiator, Gilead Sher, has said President Clinton has put together ideas for reviving peace talks, and that Israel was willing to consider them. Clinton spoke to Barak for half an hour by phone on Monday night.

The president has invited Barak and Arafat to Washington for separate talks, though no date has been set.

One of the obstacles to a resumption of negotiations has been the political instability in Israel, exacerbated by the reconvening of Israel's parliament Monday after a three-month recess.

Barak lost his parliamentary majority over the summer when three factions quit his coalition to protest concessions he prepared to make to the Palestinians at a Mideast summit in July at the U.S. presidential retreat at Camp David.

One of the defectors, Shas, agreed this week to grant Barak a parliamentary safety net for a month, meaning he can maneuver without fear of being toppled.

However, Shas leader Eli Ishai announced Tuesday that his party was not giving Barak unconditional support. ``The Camp David understandings are dead,'' Ishai told army radio. If Barak revives the Israeli proposals made at the summit, ``he doesn't have a safety net,'' Ishai said.