Israel has started setting up roadblocks in Palestinian neighbourhoods in East Jerusalem and deploying soldiers in cities across the country to try to combat the worst surge of violence in months.

Palestinian officials condemned the security measures - the most serious clampdown in the Jerusalem area since a Palestinian uprising a decade ago - as collective punishment.

Israel's security cabinet had authorised the crackdown hours earlier in an overnight session after Palestinians armed with knives and a gun killed three Israelis and wounded several others on Tuesday.

Seven Israelis and 30 Palestinians, including children and assailants, have been killed in two weeks of bloodshed in Israel, Jerusalem and the occupied West Bank.

The violence has been partly triggered by Palestinians' anger over what they see as increased Jewish encroachment on Jerusalem's Al-Aqsa mosque compound, also revered by Jews as the site of two destroyed Jewish temples.

There is also deep-seated frustration with the failure of years of peace efforts to achieve Palestinian statehood and end Israeli settlement building in the West Bank and East Jerusalem.

Israeli paramilitary border police used their vehicles to block an exit at the edge of Jabel Mukabar, an East Jerusalem neighbourhood and home to three Palestinians who carried out deadly attacks against Israelis on Tuesday.

Policemen carried out body searches and examined the identity papers of Palestinian motorists. Cars were then allowed to leave. Palestinians who live in East Jerusalem carry the same identity papers as Israelis and unlike brethren in the West Bank can travel throughout Israel.

Dimitrii Delliani, an official in Palestinian President Mahmoud Abbas's Fatah movement, said closing entrances to Palestinian neighbourhoods was "collective punishment in violation of all international law".

The government said the immediate aim was to stem stabbings and other attacks by Arab assailants, many of whom resided in Jerusalem's eastern sectors.

One Israeli official who briefed reporters on condition of anonymity said Palestinian neighbourhoods would not be sealed off completely, describing the measure as "loose encirclement".

Israel regards all Jerusalem, including the predominantly Arab east captured and annexed in 1967, as its "indivisible capital" - a claim that is not recognised internationally - and its right-wing government is wary as being portrayed as dividing the city.

"No one is going to lock down East Jerusalem," Israeli Justice Minister Ayelet Shaked said.

Prime Minister Benjamin Netanyahu also allowed revocation of residency rights of Palestinians deemed to have committed "terrorism" and a step-up in the demolition of homes of people who carry out attacks.