The city has reached a deal to save the deteriorating Pier 40 along the Hudson River.

Parts of the Manhattan pier have been closed off over public safety concerns.

Development rights will be transferred to developers working on another site across the West Side Highway.

That move is expected to generate $100 million to repair and renovate the pier.

Under the deal, 30 percent of the apartments being built across from Pier 40 will be made affordable to low and middle income families.

"The developer across the street at the St. John's building is going to purchase air rights from Pier 40. That money is going to fix the pilings below the water to ensure that Pier 40 stays operable. Right now, if we don't do anything, Pier 40 will come out of commission in the near future," said City Councilman Corey Johnson.

The city has put out before and after renderings of the proposed changes.

Plans call for removing much of the existing overpass structure at West Houston Street.

An elevated open space would be built, and access to Hudson River Park would be improved.