Israeli Prime Minister Benjamin Netanyahu and Habayit Hayehudi chairman Naftali Bennett on Sunday agreed on a revised version of the controversial nation-state bill after hours of intense talks.

The nation-state bill aims to legally redefine Israel’s official status as a “Jewish ‎‎state with a ‎‎democratic regime,” rather than a “Jewish and ‎‎democratic state,” as it is defined today in Israel’s basic laws.

If passed, the law will require the state ‎‎to preserve ‎‎the country’s Jewish character and ‎‎protect state ‎‎symbols and sacred Jewish sites ‎‎according to Jewish ‎‎tradition.

One sticking point included in the bill is a provision allowing communities to legally exclude non-Jews. The attorney general has criticized the provision as discriminatory and a violation of Israel’s basic laws, which are its de facto constitution.

On Sunday, Netanyahu and Bennett agreed to modify the contentious clause to stipulate that “the state considers the development of Jewish settlement to be a national priority, and will work to encourage and strengthen it and its establishment.”

This revised version has received a green light from the attorney general’s office, as well as from key lawmakers from the Likud and Habayit Hayehudi parties.

The bill was redrafted after Attorney General Avichai Mendelblit warned that the original language would be struck down as unconstitutional. It had previously said: “The state may allow a certain community, including that which comprises a single religion or ethnic group, to settle in a segregated nature.”

During Sunday’s weekly cabinet meeting, Tourism Minister Yariv Levin (Likud) argued that, as a legitimate realization of the Zionist vision, the bill ensure the prioritization of Jewish communities across the country. He also said that the bill must clarify that promoting this value does not constitute discrimination or inequality.

“While the bill is not perfect, we are now at a historic crossroads,” said Levin. “We have an opportunity to enshrine cardinal principles that make Zionist values once again the foundation of the state after a long time in which they have been eroded by the court.”

The chief sponsor of the bill, MK Avi Dichter (Likud) echoed Levin’s sentiments, saying that “Zionism means establishing a Jewish national home for the Jewish people in the land of Israel; of course, this means Jewish settlement in the land of Israel.”

“It boggles the mind to see Labor MKs being so opposed to this [bill],” he continued. “Didn’t they support one of the earlier versions of this bill? And didnt [former Labor Party leaders] David Ben-Gurion and Yigal Allon consider the settlement of Jews in the Negev and the Galilee to be sacrosanct?”

A special committee was scheduled to meet on Monday to iron out additional disagreements regarding the bill before it is resubmitted to the Knesset plenum for its final two votes.