Trump administration housing officials and New York City announced a deal Thursday in which the federal government will take greater control of the city's embattled Housing Authority amid complaints that tenants live amid deplorable conditions -- including lead paint, rats, mold and lack of heat and water.

The agreement between the Department of Housing and Urban Development (HUD) and NYCHA calls for a federal monitor to be appointed to oversee the nation's largest public housing system, and for the city to pony up $2.2 billion over the next few years to address the problems and resolve a lawsuit filed by federal authorities on behalf of 400,000 tenants.

"We are very hopeful the monitor will engage with the people," Housing Secretary Ben Carson said at a news conference in New York City, announcing the plan. "We should have a name in the next couple of weeks."

BEN CARSON HITS BACK AT 'HYSTERICAL' CRITICS, SAYS RENT REFORM GIVES 'POOR PEOPLE A WAY OUT OF POVERTY'

Carson traveled to New York City on Thursday to finalize the agreement with New York City's Democratic mayor, Bill de Blasio. Carson called the agreement a “positive outcome” and said he and de Blasio "were able to put aside any political differences and think about, what would provide the right kind of environment for the people here?"

De Blasio called the deal "a partnership to get things done for the residents."

Under the agreement, NYCHA will have to meet specific deadlines and benchmarks to address health and safety concerns, New York's FOX 5 reported. Some 175,000 apartments will be renovated, the report said.

One example is the authority will have 30 days to get rid of lead-based paint in apartments where children under 6 live or regularly visit.

NYC HOUSING AUTHORITY SUSPENDS EMPLOYEES OVER ALLEGED WORKPLACE ORGIES

Tenants for decades have complained about infestation, mold, heat and water outages in NYCHA apartments. A series of scandals have rocked the agency in recent years, including the resignation of former city Housing Authority Chairwoman Shola Olatoye last year after an investigation revealed false reports of lead paint inspections.

Under the terms of the agreement, the lawsuit filed by federal authorities will be withdrawn 14 days after the appointment of the monitor, who will submit regular reports to HUD.

“You will see this has a whole host of tangible goals on heat, vermin, lead, you name it. I think that's an improvement for all of us,” de Blasio said.

CLICK HERE TO GET THE FOX NEWS APP

Nicole Gueron, a lawyer for two groups that advocate on behalf of public housing residents, was pleased to hear that residents' concerns were finally being addressed.

"While we are disappointed that HUD and the city didn't invite residents to participate in the negotiations that led to the agreement, and we are troubled that the funding commitment is still woefully inadequate," Gueron said, "we are pleased that the agreement requires the monitor to engage with residents, who stand ready to work with all stakeholders to improve conditions at NYCHA."

The New York authority already receives $20 million to $30 million per week from the federal government, FOX 5 reported.

The Associated Press contributed t this report.