JERUSALEM -- A Palestinian gunman opened fire outside an east Jerusalem synagogue Friday night, killing seven people, including a 70-year-old woman, and wounding three others before he was shot and killed by police, officials said. It was the deadliest attack on Israelis in years and raised the likelihood of more bloodshed.

The attack, which occurred as residents were observing the Jewish sabbath, came a day after an Israeli military raid killed nine people in the West Bank. The shooting set off celebrations in both the occupied West Bank and Gaza Strip, where people fired guns into the air, honked horns and distributed sweets.

The burst of violence, which also included a rocket barrage from Gaza and retaliatory Israeli airstrikes, has posed an early challenge for Israel's new government, which is dominated by ultranationalists who have pushed for a hard line against Palestinian violence. It also cast a cloud over a visit by U.S. Secretary of State Antony Blinken to the region Sunday.

Addressing reporters at Israel's national police headquarters, Prime Minister Benjamin Netanyahu said he had held a security assessment and decided on "immediate actions." He said he would convene his Security Cabinet on Saturday night, after the end of the sabbath, to discuss a further response.

Netanyahu declined to elaborate but said Israel would act with "determination and composure." He called on the public not to take the law into their own hands.

White House Press Secretary Karine Jean-Pierre said the U.S. strongly condemned the attack and was "shocked and saddened by the loss of life," noting it came on International Holocaust Remembrance Day.

"The United States will extend our full support to the government and people of Israel," she said.

Israeli police said the shootings occurred in Neve Yaakov, a neighbourhood with a large ultra-Orthodox population, and that the gunman fled in a car. Police said they chased after him and after an exchange of fire, killed him.

Jerusalem police chief Doron Turjeman confirmed seven deaths, in addition to the shooter, and said three people were wounded.

Police identified the attacker as a 21-year-old east Jerusalem resident who apparently acted alone. Turjeman promised an "aggressive and significant" effort to track down anyone who had helped him.

Police also released a photo of the pistol it said was used by the attacker.

Defence Minister Yoav Gallant huddled with Israel's military chief and other top security officials and instructed them to assist police and strengthen defences near Jerusalem and for Jewish settlements in the occupied West Bank.

"Israel's defence establishment will operate decisively and forcefully against terror and will reach anyone involved in the attack," Gallant said.

Israel's MADA rescue service said the dead were five men and two women, including several who were 60 or older. Jerusalem's Hadassah Hospital said a 15-year-old boy was recovering from surgery.

The attack was the deadliest on Israelis since a 2008 shooting killed eight people in a Jewish seminary in Jerusalem, according to the Foreign Ministry. Given the location and timing, it threatened to trigger a tough response from Israel.

Overnight Thursday, Gaza militants fired a barrage of rockets into southern Israel, with all of them either intercepted or landing in open areas. Israel responded with airstrikes on targets in Gaza. No casualties were reported, and calm had appeared to be taking hold before Friday night's shooting.

There was no immediate claim of responsibility. In Gaza, Hazem Qassem, spokesman for the ruling Hamas militant group, said the attack was "a revenge and natural response" to the deadly military raid Thursday.

At several locations across the Gaza Strip, dozens of Palestinians gathered in spontaneous demonstrations to celebrate the Jerusalem attack, with some coming out of dessert shops with large trays of sweets to distribute.

In downtown Gaza City, celebratory gunfire could be heard, as cars honked and calls of "God is great!" wafted from mosque loudspeakers. In various West Bank towns, Palestinians launched fireworks.

The attack escalated tensions that were already heightened following Thursday's raid in the town of Jenin, where nine people, including at least seven militants and a 61-year-old woman, were killed. It was the deadliest single raid in the West Bank in two decades. A 10th Palestinian was killed in separate fighting near Jerusalem.

Angry Palestinians marched Friday as they buried the last of those killed a day earlier.

Scuffles between Israeli forces and Palestinian protesters erupted after the funeral for a 22-year-old Palestinian north of Jerusalem and elsewhere in the occupied West Bank, but calm prevailed in the contested capital and in the blockaded Gaza Strip for most of the day.

But that suddenly dissolved with the east Jerusalem shooting, described as "horrific and heartbreaking" by Yair Lapid, the opposition leader and former prime minister.

Neve Yaakov is a religious Jewish settlement that Israel considers to be a neighbourhood of its capital. Israel claims all of Jerusalem as its undivided capital, while the Palestinians seek east Jerusalem as a capital of their future state.

Blinken's trip will probably now focus heavily on lowering tensions. He is likely to discuss the underlying causes of the conflict that continue to fester, the agenda of Israel's new far-right government and the Palestinian Authority's decision to halt security co-ordination with Israel in retaliation for the deadly raid.

The Biden administration has been deeply engaged with Israeli and Palestinian leaders in recent days, White House National Security Council spokesman John Kirby said, underscoring the "urgent need here for all parties to deescalate to prevent the further loss of civilian life and to work together to improve the security situation in the West Bank."

While residents of Jerusalem and the occupied West Bank were on edge, midday prayers Friday at the Al-Aqsa Mosque compound, often a catalyst for clashes between Palestinians and Israeli police, passed in relative calm.

Both the Palestinian rockets and Israeli airstrikes seemed limited so as to prevent growing into a full-blown war. Israel and Hamas have fought four wars and several smaller skirmishes since the militant group seized power in Gaza from rival forces in 2007.

Tensions have soared since Israel stepped up raids in the West Bank last spring, following a series of Palestinian attacks. Jenin, which was an important a militant stronghold during the 2000-05 intifada and has again emerged as one, has been the focus of many of the Israeli operations.

Nearly 150 Palestinians were killed in the West Bank and east Jerusalem in 2022, making it the deadliest year in those territories since 2004, according to leading Israeli rights group B'Tselem. Last year, 30 people were killed in Palestinian attacks against Israelis.

So far this year, 30 Palestinians have been killed, according to a count by The Associated Press.

Israel says most of the dead were militants. But youths protesting the incursions and others not involved in the confrontations also have been killed.

Anwar Gargash, a senior diplomat in the United Arab Emirates, warned that "the Israeli escalation in Jenin is dangerous and disturbing and undermines international efforts to advance the priority of the peace agenda." The UAE recognized Israel in 2020 along with Bahrain, which has remained silent on the surge in violence.

In the West Bank, Fatah announced a general strike and most shops were closed in Palestinian cities. The PA said Thursday it would halt the ties that its security forces maintain with Israel in a shared effort to contain Islamic militants. Previous threats have been short-lived, in part because of the benefits the authority enjoys from the relationship, and also due to U.S. and Israeli pressure.

The PA has limited control over scattered enclaves in the West Bank, and almost none over militant strongholds like the Jenin camp.

Israel says its raids are meant to dismantle militant networks and thwart attacks. The Palestinians say they further entrench Israel's 55-year, open-ended occupation of the West Bank, which Israel captured along with east Jerusalem and the Gaza Strip in the 1967 Mideast war. The Palestinians want those territories to form any eventual state.

Israel has established dozens of settlements in the West Bank that house 500,000 people. The Palestinians and much of the international community view settlements as illegal and an obstacle to peace, even as talks to end the conflict have been moribund for over a decade.

------

Associated Press writer Jon Gambrell in Dubai, United Arab Emirates, contributed.