"The Jerusalem operation was a natural response to Israel's continuous crimes, including the [8-year] blockade on the Gaza Strip," Hamas' spokesman Sami Abu Zuhri said in a brief statement.

Four Israelis were killed and seven others injured in an attack by two Palestinians on a Jewish synagogue in West Jerusalem, with the two attackers gunned down by Israeli police in the immediate wake of the attack.

According to Israeli police spokesmen Micky Rosenfeld, two suspects entered a synagogue in the Har nof neighborhood in Jerusalem with knives and axes.

"Police confirm four Israelis killed in synagogue attack in Jerusalem. Both terrorists shot and killed by police," he added on Twitter.

Seven others were injured in the attack, he added.

Tuesday's attack comes amid a months-long tension in Jerusalem and the West Bank, which heightened late last month after Israeli authorities shut down East Jerusalem's Al-Aqsa Mosque complex for hours – for the first time since 1967 when Israel occupied the city.

In recent weeks, Jerusalem saw several deadly attacks as well as violent clashes between Israeli troops and Palestinian protesters.

Anadolu Agency