A D.C. Superior Court judge ordered on Friday that CityPartners, an Adams Morgan-based real estate firm, pay $895,159 in abatement fees to help return a set of dilapidated Congress Heights buildings to habitable living conditions.

The buildings in question, at Alabama Avenue and 13th Street SE, have been the subject of a lawsuit brought in January of 2016 by Attorney General Karl Racine. The suit alleges a “pattern of neglect over long period of time,” and cites rodent infestations, a lack of hot water and heat, missing or broken smoke detectors, bedbugs, and unstable ceilings as common problems in the apartments.

CityPartners took possession of that land from notorious D.C. landlord Sanford Capital in December––a move that Racine has contested––but the buildings themselves have been managed since September by David Gilmore, whom the court appointed that month as the receiver of the property.

Gilmore submitted an abatement plan in November that estimates the base cost of repairs will run at least $848,000, according to court documents, but could cost as much as $2,000,000. The cost includes replacing windows, balcony doors, and roofing, remediating mold, and ensuring compliance with other housing code violations.

CityPartners argued against the receiver’s plan, presenting an alternative that would cost $661,378 in repairs. The company also argued that, regardless of the cost, it shouldn’t be held financially responsible for funding any abatement plan. As a new owner of the properties, it said, it “has been provided no opportunity to address the conditions,” and didn’t cause or create them.

In his order, Judge John Mott wrote that CityPartners “has the legal obligation to maintain the Property in habitable condition and, even absent the receivership, CityPartners 5914 would be financially responsible for funding repairs.” He continued:

“Similarly, it is CityPartners 5914 who stands to benefit from the remediation. In addition, the court finds, based on the evidence in the record, that CityPartners 5914 purchased the property with knowledge of its condition and notice of the receivership. CityPartners 5914, therefore, should have reasonably anticipated a need to fund the remediation of the conditions at the Property, and it is appropriate that they should fund the Receiver’s Plan,” Mott wrote.

Mott also denied CityPartners’ motion to dismiss the receivership.