Image by Getty Images Israeli security forces and an ambulance are seen at the scene of an attack outside Damascus Gate in Jerusalem’s Old City on June 16, 2017. An Israeli policewoman was killed in the attack; security forces shot three suspected Palestinian assailants.

The terror groups ISIS and Hamas both took credit for a pair of terror attacks in Jerusalem on Friday, then sparred over who truly was responsible.

Israeli police officer Hadas Malka, 23, was stabbed to death and three others were wounded during attacks on security forces at the Damascus Gate in Jerusalem’s Old City by three Palestinian terrorists.

According to Israel’s Shin Bet internal security service, the three assailants, who were killed by Israeli security after the attack, were from the West Bank and had “a background in terrorist activities.”

Hours later, ISIS took credit for the attacks — which would be their first inside Israeli territory — claiming that their “soldiers of the caliphate” had launched a “blessed operation … on a gathering of Jews.”

But Hamas denied this. “The three hero martyrs who executed the Jerusalem operation have no connection to Daesh [ISIS], they are affiliated with the [Popular Front for the Liberation of Palestine] and Hamas,” Hamas official Izzat El-Reshiq tweeted.

Israeli officials, in turn, denied that Hamas was responsible. “It was a local cell,” police spokeswoman Luba Simri stated on Saturday. “At this stage no indication has been found it was directed by terrorist organizations nor has any connection to any organization been found.”

Contact Aiden Pink at pink@forward.com or on Twitter @aidenpink.