Israeli police have barred Palestinians from Jerusalem's Old City in response to stabbing attacks that killed two Israelis and wounded three others, as Israel's prime minister vowed a "harsh offensive" to counter rising violence.

A Palestinian teenager stabbed and wounded a 15-year-old Israeli before dawn yesterday before being shot dead by police.

The attack came hours after a Palestinian teenager fatally stabbed two Israelis in Jerusalem's Old City and wounded a woman and a toddler, before he was shot dead by an Israeli police officer.

Tensions have soared over access to a sensitive holy site within the Old City that is sacred to Jews and Muslims. Israeli police and Palestinian demonstrators have clashed repeatedly at the hilltop compound in recent weeks, and the unrest has spread to the West Bank, where clashes erupted on Sunday during an Israeli arrest raid.

Israeli prime minister Benjamin Netanyahu was meeting security officials on Sunday to decide upon a "harsh offensive on Palestinian Islamic terror", according to a statement on his Facebook page. "We are in an all-out war against terror," he said in the post.

Relatives of the teenager behind Sunday's attack identified him as Fadi Alloun, 19, from Arab East Jerusalem. On Saturday, he wrote on his Facebook page: "Either martyrdom or victory."