Hamas on Saturday said the three Palestinians shot dead in Jerusalem after the fatal stabbing of an Israeli policewoman belonged to local Islamist and leftist movements, rejecting an earlier claim by the Islamic State group.

“The claim by the Islamic State group is an attempt to muddy the waters,” said Sami Abou Zouhri, spokesman for the Islamist movement which runs the Gaza strip.

The attack was carried out by “two Palestinians from the Popular Front for the Liberation of Palestine and a third from Hamas”, he said.

The Islamic State, in an online statement, on Saturday said three IS fighters had targeted “a gathering of Jews” in an operation on Friday during which the three attackers were killed by Israeli police.

The group warned that “this attack will not be the last.”

During the attack, the police officer was killed and others were wounded, according to IS.

It took place as Muslims marked the end of the third Friday of the fasting month of Ramadan, during which tens of thousands of Palestinians from east Jerusalem and the West Bank attended prayers at the nearby Al-Aqsa mosque compound, Islam’s third-holiest site.

The policewoman was stabbed and critically injured and later died in hospital of her wounds. She was identified as Hadas Malka, 23, a staff sergeant major.

Israeli police said the three Palestinian assailants were killed.

According to police, two perpetrators opened fire at a group of police officers who returned fire, and a third stabbed the border policewoman a short distance away before being shot.

This was the first time that the Islamic State group has claimed responsibility for an attack in Israel, according to the SITE Intelligence Group, which monitors extremist organisations.

In its statement IS said the attack was “revenge for the religion of Allah and the sanctities of the violated Muslims.”

“Let the Jews watch for the demise of their state at the hands of the soldiers of the Caliphate,” the statement added.