TRENTON, N.J. (AP) — The New Jersey Supreme Court says the state must rewrite its affordable housing rules to again give each town a number of homes it is responsible for.

Thursday’s ruling is the latest in a decades-long legal battle over housing low- and moderate-income residents.

READ MORE: Thousands Protest Outside Philadelphia City Hall After Supreme Court Overturns Roe v. Wade

In a 3-2 ruling, the court rejected the state’s latest regulations, which would require towns to include zoning for housing for lower-income residents only if they actually had new development.

The court says the new approach is not consistent with the state’s Fair Housing Act.

READ MORE: Supreme Court Overturns Roe v. Wade, Allowing States To Ban Abortion

The justices gave Gov. Chris Christie’s administration five months to come up with new requirements for how much housing towns must provide through their zoning regulations.

(© Copyright 2013 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)

MORE NEWS: Roe v. Wade Overturned: Officials In Philadelphia Region React To Supreme Court Ruling Allowing States To Ban Abortion