The New York City Housing Authority—the nation’s largest public housing system—entered into an agreement that public officials hope will address major health and safety concerns for its 400,000 residents, the U.S. Attorney’s Office for the Southern District of New York announced Thursday.

U.S. Attorney Geoffrey Berman’s office, which sued the New York City-administered authority in June 2018, announced the agreement between prosecutors, city officials, the U.S. Department of Housing and Urban Development and U.S. Environmental Protection Agency that fell short of a potential federal takeover of NYCHA.