JERUSALEM -- With Israel reeling from its worst wave of Arab violence in years, including the shooting deaths of two policemen yesterday, the government indefinitely sealed off the occupied West Bank and Gaza Strip yesterday.
The government also relaxed the rules under which its soldiers may fire at armed Palestinians.
Prime Minister Yitzhak Rabin went on national television last night to urge that Israelis stand firm in "an all-out war against terrorism." But he also acknowledged what everyone in Israel already knew: that the country was "in the midst of a difficult period" of lethal attacks, with no end in sight.
Although Mr. Rabin's center-left coalition seems in no immediate danger, political commentators say there has been a loss of popular support for a leader who entered office nearly nine months ago promising to protect Israelis' personal safety while moving rapidly toward a peace agreement with the Palestinians.
Instead, he has no peace accord, and he must contend with a shriveled sense of security among many of his people.
It is far from the first time that the territories have been shut. Sometimes, closings have lasted only a few days. The longest period in recent years was six weeks in 1991, during the Persian Gulf war.
Some government officials say the prevailing public mood of outrage and fear may limit the prime minister's ability to make compromises to help restart the stalled Middle East peace talks and then move them in a purposeful direction. "The whole situation makes it much more difficult for the government to maneuver," one official said.
Since the start of the Palestinian uprising in December 1987, there has not been a period of such sustained anti-Israel violence as in the last month. Just about every day, there have been stabbings and shootings, leaving 15 Israelis dead in March, more than in any month in several years. The number of wounded is higher still.
No matter how bad the violence has been for Israelis, the casualty rate remains much higher for Palestinians in their encounters with Israeli soldiers.
But the relentlessness of the recent attacks has been a shock for Israelis. Tabloid newspapers have contributed to the mood with enormous pictures of gore -- one Monday of a blood-drenched victim with a knife sticking out of his back.
People have been whipped into "a state of mass hysteria that plays into the hands of the terrorists," said Prof. Ariel Merari, a terrorism specialist at Tel Aviv University.
In the last day alone, the death toll climbed by three.
A Jewish settler was fatally stabbed Monday night by an Arab in the Gaza Strip, and two traffic policemen were shot in the head at close range early yesterday as they sat in their patrol car in Hadera, which is 25 miles north of Tel Aviv, well within Israel's pre-1967 borders.
Later, an armed wing of the Hamas movement of Muslim militants took responsibility. Hamas was the main target of Mr. Rabin's deportation in mid-December of more than 400 accused militants from the occupied territories to Lebanon, an action that produced worldwide condemnation of Israel and complicated efforts to get the peace negotiations going again.
While Israel insists that those expulsions seriously damaged Hamas operations, terrorism obviously has not disappeared, a point reinforced yesterday with the killing of the two policemen.
Under pressure to act swiftly, the prime minister called his Cabinet into emergency session and then announced that the 1.8 million Palestinians in Gaza and the West Bank would be barred from entering Israel until further notice. Ever-roiling Gaza was already sealed off Monday.
The goal, officials said, is a cooling-off period for the Arab and Jewish populations -- a move intended, some said, not just to protect Israelis from possible attacks but also to make it less likely that Palestinians will suffer Israeli reprisals.
Thus far, the sharpest reactions to the killings have come from Jewish settlers in the territories, who have intensified street protests and their own violence. Palestinians in Gaza said settlers had taken revenge yesterday for the latest killing there by setting fire to a mosque in the town of Khan Yunis.
Mr. Rabin promised stepped-up army operations in the territories and announced new open-fire regulations for soldiers, saying they may shoot at any Palestinian carrying a weapon, even someone in no position to use it.
In the past, soldiers' lives had to be in immediate danger before they could fire.
The time has also come, the prime minister said, for Israelis to end their dependence on cheap Arab labor, so that there will be fewer Palestinians in their midst and fewer opportunities for terrorism.
In past struggles, he said last night, "we didn't win by the strength of our weapons, but rather by the strength of our spirit and the staying power of the people, standing behind the army even in times of trouble."
But if Mr. Rabin viewed the fight against terrorism as a war, he did not enjoy instant national cohesion. Instead, he found himself accused by right-wing opposition parties, led by Likud, of doing too little, too late.
Many on the right accused the prime minister himself of inspiring Arab violence by having been conciliatory in the peace talks, and some called on him to step aside in favor of an ill-defined government of national unity with emergency powers.
For their part, Palestinians denounced this latest shutdown of the territories as a form of collective punishment that would deny a regular income to hundreds of thousands of people.
Faisal Husseini, the Palestinian leader in East Jerusalem, called the closing "a new obstacle to the peace process."