U.N. Secretary-General Antonio Guterres addresses a news conference on the sides of the 28th Ordinary Session of the Assembly of the Heads of State and the Government of the African Union in Ethiopia's capital Addis Ababa January 30, 2017. REUTERS/Tiksa Negeri

UNITED NATIONS (Reuters) - The Israeli parliament’s move to legalize thousands of settler homes in the occupied West Bank goes against international law and will have legal consequences for Israel, United Nations Secretary-General Antonio Guterres was quoted as saying on Tuesday.

Palestinians have condemned the legislation approved by Israeli lawmakers on Monday as a blow to their hopes of statehood, but its passage may only be largely symbolic as it contravenes Israeli Supreme Court rulings on property rights.

The legislation retroactively legalizes about 4,000 settler homes built on privately owned Palestinian land.

“The Secretary-General deeply regrets the adoption of the (bill) ... This bill is in contravention of international law and will have far-reaching legal consequences for Israel,” Stephane Dujarric, spokesman for Guterres, said in a statement.

“The Secretary-General insists on the need to avoid any actions that would derail the two-state solution,” said Dujarric, referring to longstanding international efforts to resolve the Israeli-Palestinian conflict.

Israel’s attorney-general has said the law is unconstitutional and that he will not defend it at the Supreme Court.