Former UK foreign office minister Sayeeda Warsi has been criticised by British-based Israeli advocacy group after she tweeted about an attack at Jerusalem synagogue in which four people were killed.

Baroness Warsi, who resigned from the UK government in August over its policy on the crisis in Gaza, wrote a series of tweets in the aftermath of the Tuesday morning attack.

In one tweet, she linked violence at Al Aqsa mosque compound in recent weeks with Tuesday's deadly attack at the synagogue in west Jerusalem.

She later called on the British Prime Minister David Cameron and Leader of the Opposition Ed Miliband to condemn all the violence in Israel and the occupied Palestinian territories.

Lady Warsi's tweets were strongly condemned as "disgusting" by the Zionist Federation, a UK-based Israel lobbying group.

Jeremy Newmark, the former chief at the UK's Jewish Leadership Council, expressed horror at the former foreign minister's messages.

"Shocked to see Baroness Warsi's warped tweet attempting to justify Jerusalem terror attacks..." he wrote on the micro blogging site.

Four Israelis were killed and eight were injured when two men armed with knives, axes and a gun attacked worshippers at a synagogue in west Jerusalem.

The two attackers, Palestinians from east Jerusalem, were later shot dead by Israeli police.

The militant group, Popular Front for the Liberation of Palestine (PFLP,) claimed responsibility for the attack on Tuesday, while the Gaza-based militant group Hamas praised the attack.

Warsi resigned from the British government during the 2014 summer war in Gaza, saying its position on the fighting was "morally indefensible."