About 90 New Jersey towns have agreed to zone for more than 30,000 units of affordable housing over the next decade, as part of settlements reached in state court, according to the nonprofit Fair Share Housing Center.

The settlements represent resolutions to the perennial tug-of-war in New Jersey between housing activists pushing for more affordable housing and towns hoping to lower the number of units they're required to build.

Those units are only a fraction of the total number of affordable housing units expected through 2025, because dozens of other towns still have not reached agreements on their obligations.

"These settlements represent compromises on all sides," said Anthony Campisi, a spokesman for Fair Share Housing Center. "We've agreed to come down from our numbers a little bit in exchange for higher commitments from these towns."

Towns zone for affordable housing, but developers are responsible for building it.

In November, Jeff Surenian, an attorney for nearly 50 New Jersey towns and cities, said cities and towns across the state should probably have lower affordable-housing obligations, but they cannot afford the court fights.

"The reason why municipalities settle is because Fair Share Housing Center will cost them a fortune in litigating it ... not because they don't have legitimate positions," he said last month. "The settlements mean nothing."

The settlements come as the state Supreme Court considers whether towns must account for a "gap period" when the state was not assigning affordable-housing obligations to towns.

From 1999 to 2015, the Council on Affordable Housing was not functioning, so towns did not receive clear guidelines on expectations for affordable units. While some towns continued to zone for affordable housing, others did not.

Towns and cities in New Jersey are required to zone for their "fair share" of affordable housing, thanks to two court cases around exclusionary zoning practices in Mount Laurel in 1975 and 1983.

According to Campisi, 65,000 affordable homes have been built in New Jersey as a result of the Mount Laurel decisions, and another 15,000 dilapidated units have been rehabilitated.