TRENTON - A New Jersey appeals court has heard arguments in a case that will determine the amount of affordable housing each town must provide.

It's a major issue in municipal races in Tuesday's primaries.

The state Supreme Court ruled in 1983 that all towns have a constitutional duty to provide homes for the neediest residents. But there was no clear guidance on how many and the court in 2015 ordered judges to handle the process.

A judge in Ocean County ruled in February that towns must factor in the need that accumulated from 1999 to 2015. However, the judge capped the total at 1,000.

Several Ocean County towns argued on Monday the law doesn't apply to past needs.

The issue is likely to return to the state Supreme Court.