JACKSON, Miss. — A Mississippi city has agreed to stop trying to zone 2,400 apartments out of existence after federal officials alleged the move was discrimination because it would uproot African American and Hispanic tenants.

The city of Ridgeland’s settlement with the U.S. Department of Housing and Urban Development, announced Wednesday, could also provide a roadmap to settle 10 other lawsuits related to the city’s 2014 zoning changes, but it’s not clear if apartment owners and dwellers who have sued will be satisfied with the deal.

The Madison County city in 2014 rezoned six apartment complexes to mixed-use development, requiring owners to eventually demolish 1,400 units. Owners of nine other complexes were required to demolish an estimated 1,000 units to meet reduced density rules.

The dispute is the highest profile in a series of zoning fights over rental properties in Jackson’s suburbs.

Owners and tenants sued Ridgeland, alleging the changes were motivated by concerns about the increasing number of black and Hispanic students in the city’s schools. HUD last year filed a fair housing complaint.

“While zoning is the primary responsibility of local government, it cannot be used as a vehicle for discriminating against minority families through a campaign of depopulation,” Gustavo Velasquez, HUD Assistant Secretary for Fair Housing and Equal Opportunity, said in a statement . “Everyone, regardless of their race, should have the opportunity to live where they choose and HUD will continue to take appropriate action when that right is violated.”

The agreement says all apartment complexes will be treated as they were before the 2014 changes. It also says Ridgeland will notify owners of zoning changes, won’t initiate exterior inspections more than once every two years, and will seek participation in planning and zoning by apartment residents.

Ridgeland Mayor Gene McGee said the city isn’t giving up on its goals, but is grandfathering existing complexes.

“Resolution with HUD allows the city to continue to move forward with its goal of improving the health, safety and welfare of all of its citizens,” McGee wrote in an email to The Associated Press. “Under the agreement, the density requirement will remain in effect and the mixed use zoning that affects six apartment complexes will remain in place but their nonconformities will be grandfathered.”

Michael Cory Jr., who represents six apartment complexes that sued, said some owners may reject nonconforming use status, instead wanting property zoned for apartments.

“They bought those properties with the expectation that they would continue to benefit from them as long as they took care of them,” Cory said

Owners who sued are likely to seek legal fees, and Cory said at least one complex lost money when it refinanced at a higher interest rate because of legal uncertainties.

But residents could be more secure, said John Jopling of the nonprofit Mississippi Center for Justice.

“Now, the tenants don’t have to worry on a day-to-day basis that their apartment complex is going to close down,” said Jopling, whose group represents five tenants.

McGee declined comment on how Ridgeland will resolve private suits.

Legal fights in other Jackson suburbs have also focused on rental property. Five mobile home parks are challenging Pearl in federal court, saying the city’s safety regulations seek to close their businesses.

The Mississippi Supreme Court ruled in 2015 that Richland couldn’t block a mobile home park from replacing individual trailers. But the court that year also upheld most of Madison’s property rental ordinance, including a requirement that owners post a $10,000 bond for each property against possible repairs.

Follow Jeff Amy at: http://twitter.com/jeffamy . His work can be found at http://bigstory.ap.org/author/jeff-amy .