jerusalem synagogue
An armed Israeli police officer gestures near the scene of an attack at a Jerusalem synagogue Reuters

Israel is to relax restrictions on carrying weapons for self-defence following the deadly attack on a Jerusalem synagogue, killing four worshippers, according to Israeli Internal Security Minister Yitzhak Aharonovich.

"In the coming hours, I will ease restrictions on carrying weapons," he was quoted as saying by AFP news agency.

Aharonovich added that the relaxed restrictions would not apply to the general public but to anyone who already owns a licence to carry a gun, such as private security guards and off-duty army officers.

The Palestinian assailants in the deadly attack, both from East Jerusalem, were armed with a pistol, knives and axes and both were shot dead, Israeli police confirmed.

Israeli Prime Minister Benjamin Netanyahu said that his government would respond to the deadliest attack for six years in the holy city "with a heavy hand".

Palestinian Authority President Mahmoud Abbas strongly condemned the killings.

"The presidency condemns the attack on Jewish worshippers in their place of prayer and condemns the killing of civilians no matter who is doing it," his office said in a statement.

Hamas spokesman Sami Abu Zuhri hailed the killings on Facebook saying they were in retaliation for the death Yusuf Hassan al-Ramouni, a 32-year-old bus driver.

"Jerusalem attack is a reaction to the execution of the martyr al-Ramouni and the ongoing Israeli crimes at al-Aqsa," Hamas Spokesman Sami Abu Zuhri wrote on Facebook. "Hamas calls for the continuation of acts of revenge".