The Israeli military on Thursday sealed off the southern West Bank town of Yatta, home to two cousins who opened fire in a central Tel Aviv entertainment complex the previous night, killing four people and injuring five.
"Following yesterday's terror attack in Tel Aviv, the crossings in and out of Yatta are currently open for humanitarian and medical cases only," a Tel Aviv-based military spokeswoman said.
She said soldiers mapped the home of one of the shooters, preparing to demolish it. Demolition of family homes of militants a controversial punitive measure that Israel uses as a "deterrent."
Israel froze 83,000 entry permits issued to Palestinians wishing to travel to or through Israel to visit family during the Muslim holy month of Ramadan, the military said in a statement.
Some 240 relatives of the gunmen had their general travel permits frozen, it added. And all Gazans had their permits revoked to travel through Israel to Jerusalem's al-Aqsa Mosque for Ramadan.
Hamas, the Islamist movement in de facto control of Gaza, warned that the fasting month, which ends July 5, would bring more "bad" to Israel, as long as Palestine continued "to give birth to heroes like those who carried out the operation in Tel Aviv."
The shooting was the first major incident since outspoken hardliner Avigdor Lieberman became Israel's new defence minister 10 days ago.
"I don't intend to talk about and detail the steps that we plan to take. For sure there's no intention to settle for just talking," he said Thursday while visiting the cafe where the two Palestinians from Yatta opened fire.
His deputy, Eli Ben-Dahan, warned: "Life in the village of Yatta won't carry on as usual. A village that has terrorists leaving from its midst will pay the price."
On Wednesday evening, the two gunmen sat down in the Max Brenner cafe, part of the city's Sarona park, which houses cafes, restaurants, boutiques and gardens.
They ordered food before taking firearms from their bags and opening fire, killing four people and injured five others before being overpowered by police.
Prime Minister Benjamin Netanyahu convened his security cabinet on Thursday at the Tel Aviv defence and military headquarters, located immediately opposite Sarona.
Hamas, in a statement by its West Bank spokesman Hussam Badran, called the chosen location of the shooting a "message" to Lieberman, who before taking office had threatened to assassinate its leaders unless the movement released the bodies of soldiers killed in the 2014 Gaza war within 24 hours.
Since taking office, the hawkish politician has toned down his language.
US State Department spokesman Mark Toner condemned the "horrific terrorist attack in Tel Aviv in the strongest possible terms."
"These cowardly attacks against innocent civilians can never be justified," he said.
An EU condemnation said "Those responsible for these murders must be brought to justice. Those who praise this attack must be condemned."
United Nations Middle East envoy Nickolay Mladenov said he was "shocked" to see Hamas welcome the attack.
Palestinian President Mahmoud Abbas said in a statement that he "rejects all operations against civilians from any party whatsoever."
But his secular Fatah party in a statement called the shooting an "individual and natural response" to Israeli home demolitions; visits by Jews to Jerusalem's Temple Mount / Noble Sanctuary, which houses al-Aqsa Mosque but also the ruins of the Biblical Jewish Temple; and the "cold-blooded killing" of Palestinians at checkpoints.
Palestinians have launched scores of knife attacks against Israelis since last October, protesting the occupation and perceived violations - denied by Israel - at the disputed Jerusalem holy site. But the last weeks marked a lull in the violence.
More than 200 Palestinians and 33 Israelis have been killed in the violence.
Israel says the vast majority of Palestinian dead are assailants, killed in 151 knife attack and dozens of shootings launched at Israeli security forces guarding checkpoints and settlements, and against civilians in Jerusalem and elsewhere in Israel.
Many Palestinians claim that Israel has "fabricated" many of the attacks, or uses excessive force against attackers. Israel vehemently denies this, but one soldier is on trial for shooting in the head a knife-attacker who was already lying injured on the road, no longer posing a threat in the southern West Bank city of Hebron.