The Israeli Supreme Court froze a controversial law that legalises certain wildcat West Bank outposts built on private Palestinian land.

The court’s interim order issued Thursday postponed for two months implementation of the Regulation Law, which several Palestinian authorities had challenged. The government has until the end of the freeze to respond.

The law allows the government to expropriate private Palestinian land on which illegal outpost homes have been built. However, the outpost must have been built in good faith or have government support. Palestinian landowners are to be compensated financially or with other land.

Widely condemned by Israeli and foreign activists, the law could allow the government to retroactively legalise some 4,000 illegally built Israeli homes.

Ahead of the final Knesset votes on the measure in February, Attorney General Avichai Mandelblit warned it violated Israeli and international law. After the bill passed, Mandelblit officially notified the Supreme Court that he would not defend the legislation if it were challenged.

A private attorney, Harel Arnon, replaced Mandelblit to represent the state on Supreme Court petitions against the law, which was meant originally to save the since-razed outpost of Amona.