BAYONNE, N.J. — A $2.1 billion project to deepen navigation channels in New York Harbor has been completed after more than a quarter century and the containment of hazardous waste from decades of industrial operations.

The last bit of sediment was hauled out of New Jersey waters this summer, and federal lawmakers, the U.S. Army Corps of Engineers, and the Port Authority of New York and New Jersey marked the project’s completion at a ceremony Thursday in Bayonne.

The project deepened 38 miles of channels to 50 feet from the south of the Verrazano Narrows Bridge to the waters between New Jersey and Staten Island. It will allow larger container ships to access Port Newark/Port Elizabeth.

The work started in 1989 and became one of the largest infrastructure projects in the region’s history.

Col. David Caldwell, the Corps district commander, described the undertaking as “the most important and influential project related to modern day economics in the Northeast.”

Environmentalists had raised concerns about the project saying that dredging the harbor’s waters, heavily polluted from years of industrial waste, could stir up toxic chemicals.

But the Corps said it used most of the sediment to cap landfills or was able to confine the contaminated sediment to make sure it didn’t migrate across the region’s waterways.

“Most of the material was far below hazardous-waste levels,” Bryce Wisemiller, project manager for the Corps, told The Record (http://bit.ly/2bZQ5aL ). “But it is contaminated enough that you have to manage how and where it is placed. New Jersey came with a like-on-like placement approach. Something like arsenic would be taken to sites like a landfill that was already contaminated with arsenic.”

Debbie Mans, executive director of the advocacy group NY/NJ Baykeeper, said the project had flaws but was ultimately beneficial to the health of the waterways.

“You’re getting a lot of contaminated sediment out of there and that’s definitely going to be better for the area in the long run,” she said.

A $1.3 billion project to raise the Bayonne Bridge, which connects Bayonne and Staten Island, is scheduled for completion next year. The project would allow the world’s biggest ships to reach Newark and Elizabeth.