Israeli MPs voted against a bill that would have retroactively legalized settlers' homes built on Palestinian private land.
The bill was seen as an attempt to circumvent a previous supreme court ruling that ordered the removal of five buildings from the Ulpana neighbourhood in the West Bank settlement of Beit El by 1 July. The property was built on private Palestinian land and did not have the required permits.
According to the bill, land owners in the West Bank would have up to four years to challenge construction on land they owned. After the deadline they would lose the legal right to do so.
Prime Minister Benjamin Netanyahu strongly opposed the bill on the grounds it would create an international backlash. Instead, he instead supported a plan to physically remove the five buildings stone by stone and to relocate them.
The demolition of the buildings is set to affect 142 people, provoking anger among settlers and their backers in parliament.
Some 30 families, including 60 adults and 82 children live in the buildings, Ulpana residents told AFP.
Hundreds of protesters who supported the bill marched to the Knesset building to protest against the vote and clashed with security officers.
The MP who proposed the bill, Zevulun Orlev, criticised the vote and said it had been swayed by the prime minister.
"Like a magician pulling a rabbit out of the hat, the prime minister and members of the cabinet suddenly came out with the claim that Israel will face international prosecution," ynetnews.com quoted him saying.
Orlev's accusations came after Netanyahu allegedly threatened to fire any cabinet minister or deputy who voted in favour of the bill.
The absence of two ministers who said they would back the bill during the vote prompted further speculations.