Two Arab gunmen killed two police officers on a city street in Israel on Sunday and were then shot dead, as the US secretary of state and three Arab foreign ministers visited the country for a summit.
Islamic State claimed responsibility for the attack in a statement posted on its Telegram account.
The two assailants in Hadera, a city about 50 km (30 miles) north of Tel Aviv, were Arab citizens of Israel and sympathisers of the group, Israeli security officials said.
"We condemn today's terrorist attack in Hadera, Israel," US Secretary of State Antony Blinken wrote on Twitter. "Such senseless acts of violence and murder have no place in society. We stand with our Israeli partners and send our condolences to the families of the victims."
The attack occurred five days after an Arab from southern Israel killed at least four Israelis in a stabbing and car ramming spree in the city of Beersheba, before he was fatally shot by a passerby.
Surveillance camera footage broadcast on Israeli television stations showed two men opening fire with assault rifles on a main street in Hadera, raising fears in Israel of a wave of such attacks.
Two members of Israel's paramilitary border police were killed by the assailants, police said. The two gunmen were shot dead by police officers who had been dining at a nearby restaurant.
"Luckily, our officers managed to neutralise the assailants and prevent a bigger terrorist attack," national police spokesperson Eli Levy said on Israel's Kan television.
In Israel's southern Negev desert, the foreign ministers of the United Arab Emirates, Bahrain and Morocco, three countries that normalised relations with Israel in 2020, convened for a summit with Blinken in attendance.
Israeli Foreign Minister Yair Lapid "updated the foreign ministers participating in the Negev Summit on the details of the terror attack in Hadera," the Israeli foreign ministry tweeted.
"All the foreign ministers condemned the attack, and asked to send their condolences to the families of the victims & wishes for the recovery of the wounded," the ministry said.
Israeli security officials have cautioned about an escalation in attacks on Israelis in the run-up to the Muslim holy month of Ramadan in April - a volatile period in the past.
Jordan's King Abdullah is due to meet Palestinian President Mahmoud Abbas in the occupied West Bank on Monday in what is widely seen in Israel as an attempt to calm tensions ahead of the holiday period, which also includes Easter and Passover.