Israeli police have shot dead three Palestinians after a 23-year-old policewoman was knifed to death outside the Old City of Jerusalem.

The three assailants, in a co-ordinated gun and knife attack, targeted officers after attending Friday prayers at the al-Aqsa Mosque on 16 June.

The dead policewoman was named as Hadas Malka, who joined the Border Police 15 months ago. Authorities said that the attack could have been much worse had a homemade gun used in the attack had not jammed, reported the BBC.

Malka had tried to struggle with the assailant, after responding to sounds of gunfire near Damascus Gate, where two of the dead attackers were killed, when she was attacked, reported the Times of Israel.

"Hadas fought her attacker for several seconds, while he stabbed her repeatedly and while trying to reach for her weapon," a statement from the force read.

The attacker was killed by a nearby officer, but four other people injured including one policeman.

The attackers were identified as Adel Ankush, 18, from the West Bank village of Deir Abu-Mash'al near Ramallah, Bra'a Salah, 19, from the same village, and Asama Ahmed, 19, from the nearby village of Tsatfa Ata.

Hadas Malka
Israeli Border Police officer Hadas Malka was killed near Damascus Gate. Peter Lerner / Twitter

Police raids have taken place at homes linked to the families of the attackers with The Times reporting that all three had been arrested for terror charges before.

The Old City was said to be busy with thousands of Muslim worshippers who had travelled to the mosque during the Islamic holy month of Ramadan with Palestinians from the West Bank travelling en-masse to Jerusalem.

There has been consistent violence in the area since September 2015 with mostly Palestinian attackers killing 43 Israelis, two visiting Americans and a British student in knifings, gun and car-ramming attacks.

In the same period more than 240 Palestinians have also been killed while others have been killed in clashes with the Israeli authorities.