ISRAEL—Israel’s parliament has passed a law to retroactively legalize thousands of West Bank settlement homes.

The law passed 60-52 during a late-night vote on Monday, February 6. The law is expected to be challenged in Israel’s Supreme Court and will most likely face legal obstacles.

“We are voting tonight on our right to the land,” said Cabinet Minister Ofir Akunis during a debate held before the vote. “We are voting tonight on the connection between the Jewish people and its land. This whole land is ours. All of it.”

The law retroactively legalizes several thousand homes built illegally on private Palestinian land. The original landowners would be compensated either with money or alternative land, even if they do not agree to give up their property.

The international Israeli community strongly opposes settlements and views them as an obstacle to peace. The law is part of a series of pro-settlement steps taken in recent weeks by Israel’s hard-line government, which has been emboldened by the election of U.S. President Donald Trump.

Before the law passed, Nickolay Mladenov, the U.N. Mideast envoy, called on lawmakers to vote against the law, stating that “it will have far-reaching legal consequences for Israel and greatly diminish the prospects for Arab-Israeli peace.”