Israel's prime minister has ordered authorities to destroy the homes of the attackers who killed four people in a Jerusalem synagogue.

Benjamin Netanyahu also ordered the demolition of the homes of Palestinians involved in other recent deadly attacks.

Three Americans were among those killed, the US State Department has confirmed.

The fourth victim was a British man, while all four were immigrants to Israel and held dual citizenship, Israeli police said.

State Department spokeswoman Jen Psaki named the three US citizens as Mosheh Twersky, Aryeh Kupinsky and Cary William Levine.

US secretary of state John Kerry, travelling in London, condemned the attack on "innocent people who had come to worship".

A pair of Palestinian attackers burst into a synagogue during morning prayers with meat cleavers and a gun, killing four people before they were shot dead by police.

The attack occurred in Jerusalem's Har Nof neighbourhood, an ultra-Orthodox area with a large number of immigrants from Western countries.

Mr Netanyahu announced the directive after a meeting top security officials. He did not say when the demolitions would take place.

Israel halted its much-maligned practice of home demolitions in 2005 after officials determined it was not an effective deterrent. But they have had a change of heart recently and begun to renew the tactic in certain cases.