Lucia Zevala walks through the East End Mobile Home Park in Manassas, Va., in March. (Michael Robinson Chavez/The Washington Post)

Residents of a Manassas mobile-home park who had been threatened with eviction will very likely be able to stay in their homes after the city agreed to allow a local nonprofit agency to buy the property.

The Manassas City Council voted unanimously Monday night to enable Catholics for Housing, a Northern Virginia nonprofit group, to purchase the East End mobile-home park for $1.4 million.

The site had been declared a health hazard by the city after years of unrepaired sewer leaks. About 18 months ago, the city signed an agreement to buy the property, provided the 300 tenants on the 57 lots were evicted so that the sewer pipes could be removed.

The vote Monday night means that instead, Catholics for Housing can become the landlord for the families, most of whom are Latino immigrants. Under the terms of the sale, which was not yet completed, the nonprofit group would assume responsibility for fixing the sewer system, at an estimated cost of $1.5 million; keep monthly lot fees at $650 for almost all the residents for at least five years; fix the park’s crumbling roads; and plow them after snowstorms.

“We are doing this for the express purpose of sustaining these homes for the residents of East End,” said Catholics for Housing Executive Director Karen DeVito. “We’re going to make this happen, and it’s going to work.”

An empty trailer sits in the East End Mobile Home Park in Manassas. (Michael Robinson Chavez/The Washington Post)

Timothy Cope, the attorney for the current property owner, the Helen Loretta Clarke Trust, did not respond to phone calls seeking comment.

DeVito said that the organization expects to complete the purchase in early November, after submitting construction drawings and bonds to the city. Once the sewer lines are fixed, she said, they will be incorporated into the city’s public sewer system, which means the city will repair and maintain the lines in the future.

Catholics for Housing is preparing new, multi-year leases for the tenants, DeVito said.

The city had an April 2016 contract with the Helen Loretta Clarke Trust to buy the property for $1.8 million. Residents were told in August 2016 that they had until February 2017 to leave.

Tenants said they could not afford to move their trailers to another park or find other housing in the expensive Washington area.

“We are all poor. . . . The cost of living is too high,” Selfo Sosa, a construction worker who has lived at East End since 2012, said last spring.

On the advice of a pro bono attorney, residents began withholding about $170,000 in monthly lot fees, part of a court case to try to force the landowner to fix the sewer lines. That money will now go toward repairing the lines, officials said.

The latest stories and details on the 2017 Virginia general election and race for governor.

“This is huge, this is great, and it was accomplished without a lawsuit,” said Victor M. Glasberg, the Alexandria lawyer who threatened to sue on behalf of the tenants. “In the end, everyone did what they should have done from the beginning.”

The pipes flooded raw sewage after rainstorms, leaving a strong odor, biting insects and ruined floors in the modest homes. That attracted the attention of city officials around 2008. They say they spent six years trying to get the property owner to fix the pipes. Pope said the trust could not afford the repair.

The porous lines allowed up to 200,000 gallons of rainwater a day to drain toward the Upper Occoquan water treatment plant, eating up capacity that officials say soon will be needed for new commercial and residential development.

Several would-be rescuers appeared and disappeared in 2016 and early 2017 before Catholics for Housing came forward. The organization is a small nonprofit that manages 18 other rental properties in Arlington, Fairfax and Fredericksburg and co-owns its original property in Vienna.