The highest court in D.C. on Thursday halted the city’s plans to raze and redevelop Barry Farm, a public housing complex in the poorest part of Washington, vacating the zoning commission’s approval of the project and sending it back for reconsideration.

The D.C. Court of Appeal’s ruling is a win for tenants of the dilapidated complex in Southeast, who feared they would lose their subsidized apartments and be left scrambling for housing in a quickly gentrifying city.

And it’s a setback for the District’s decade-long effort to break up concentrated poverty by replacing public housing with residential development that attracts a mix of renters and owners of different income levels.

Under the New Communities Initiative, the 444-unit Barry Farm complex is slated to become a 1400-unit development with market-rate apartments, town homes, retail and other amenities, in addition to public housing.

Officials had assured the remaining tenants that they would be relocated during demolition and reconstruction, and would have an opportunity to move back.

But residents have argued that they would be displaced because plans call for the creation of 344 units for low-income residents — 100 fewer than exist now. To compensate, the developer pledged to construct 100 “off-site” units for low-income residents.

The court seemed to side with residents, noting there would be a “net loss” of 100 affordable units at Barry Farm.

Ari Theresa, an attorney for the tenants, said he’s hopeful the zoning commission will now have to address the risk of displacement in light of the court’s decision. He said he would seek an injunction to block demolition.

“The ability to develop in place is the ultimate goal, so people don’t have to leave the project site for the 10 to 12 years the development is supposed to be taking place, so they can stay within their community as a new community develops,” Theresa said.

More than half the tenants at Barry Farm have already moved out; 120 families remain, according to the D.C. Housing Authority.

A spokesman for the agency, Richard A. White, said officials were reviewing Thursday’s ruling.

“However, our first concern is the impact on the hundreds of people who planned to return to the redeveloped site in 2020,” White said. “Over the last several months, Ward 8 families made the decision to relocate from the Barry Farm community while demolition and redevelopment are underway. These families should not be overlooked or forgotten. DCHA remains committed to the families who desire to return to the new development, which is guaranteed by DCHA policy.”

City officials vowed to press on with the project. “We owe it to our residents and the District to rebuild Barry Farm with safe, affordable housing and amenities which residents in other parts of the District enjoy,” Deputy Mayor for Planning and Economic Development Brian Kenner said in a statement. “D.C. Housing Authority and its partners must carefully review the decision and address issues in order to move ahead with much-needed housing for District residents.”

The developer, Baltimore-based A & R Development, did not immediately return requests for comment.

Robert Marus, a spokesman for D.C. Attorney General Karl A. Racine, said the developer could request a rehearing from the Court of Appeals, or could opt to return to the zoning commission for a reconsideration of the project.

Opponents of the plan have also argued that in addition to losing 100 affordable units at Barry Farm, families will be displaced because the renovation plans include fewer multi-bedroom units.

The court concluded the zoning commission failed to properly consider that and other issues when approving plans in 2014 to redevelop Barry Farm.

But the court also made clear its decision wasn’t a fatal blow.

“We are not necessarily holding that the development may not go forward on this site, but rather, are simply requiring that the Commission give fuller consideration to and explain its determinations on the issues that we have identified,” wrote Chief Judge Anna Blackburne-Rigsby in the court’s opinion.

She faulted the plan to relocate residents as insufficient.

“Given the dramatic effect that a forced relocation can have on a family’s well-being, such families are entitled to some semblance of predictability,” Blackburne-Rigsby wrote.

“For Barry Farm residents, the relocation plan must be attuned to the realities of the D.C. housing market, and sensitive to the fact that many residents in Ward 8 have already been displaced from other parts of the District.”

The judge also found city officials failed to weigh how redevelopment would hurt residents.

While the zoning commission considered new housing, a retail corridor and other changes as benefits to Barry Farm residents, the judge said it failed to address how gentrification, the loss of grassy yards and fewer affordable units would hurt the community.

At a 2014 hearing, a city planning official was unable to answer questions about the demographics of Barry Farm residents and the gentrification pressures the project would bring to the neighboring communities.

That, Blackburne-Rigsby, said, “suggested a gap in knowledge with regard to the current Barry Farm community, which precluded a comprehensive understanding of all adverse effects.”

The opinion also comes as Mayor Muriel E. Bowser (D) is trying to revise the city’s comprehensive plan to limit the ability of opponents to delay or block development.