An empty trailer sits in the East End Mobile Home Park in Manassas, Va., on March 26, 2017. (Michael Robinson Chavez/The Washington Post)

About 60 families who were facing eviction from a Northern Virginia mobile home park will be able to stay under a deal finalized Thursday, that will transfer ownership to a nonprofit group with plans to fix the park’s leaky sewer system.

Catholics for Housing purchased the East End Mobile Home Park in Manassas for $1.4 million, officials said. The group will pay an additional $1.6 million to repair eroding sewer and water pipes there, and then turn over operation of those utilities to the city, said Karen DeVito, executive director of Catholics for Housing.

The mostly Latino immigrant families had been facing eviction since August 2016 after city officials declared that the living conditions there were unsafe, and moved to buy the property with plans to tear it down.

The property’s owner, the Helen Loretta Clark Trust, had been cited for several years for leaks that allowed raw sewage to pour into the park’s grounds, but claimed that it didn’t have the money to make repairs.

Local activists, including Del. Lee Carter (D-Prince William), moved to rescue the park while arranging in Circuit Court to withhold rent payments to the owner.

After a series of ups and downs over the ensuing months, Catholics for Housing stepped forward with its purchase offer, which Manassas officials approved in October.

“We are looking forward to the reconstruction of the sewer and water facilities which will become part of the city’s municipal system,” said Manassas City Manager W. Patrick Pate. “We hope that under the management of Catholics for Housing, we will see continued revitalization of this neighborhood.”