A last-minute ruling by a Ramsey County district judge allowed a north Minneapolis metal shredding facility to stay in operation beyond Thursday, when it was legally mandated to shut down following years of concerns about air pollution.

The court order by Judge John Guthmann allows the Northern Metal Recycling facility on the Mississippi riverfront to stay open while it negotiates with the Minnesota Pollution Control Agency (MPCA), the state agency announced Tuesday. The metal recycling company had called for dispute resolution in court after the agency rejected its request to keep the facility running until October while it finishes a new facility in Becker, Minn.

In a statement, MPCA Commissioner Laura Bishop said the agency intends to follow the dispute resolution, a process that was laid out in a 2017 court settlement with the company.

“I understand that this turn of events will be extremely frustrating to people who live near Northern Metals and who have worked hard over many years to make their voices heard about this issue. I am frustrated, too,” Bishop said in the statement.

Roxxanne O’Brien, a north Minneapolis resident who has organized against the facility since 2011, said neighbors who lived nearby were planning to celebrate its closure Thursday. Guthmann’s order was a “very big blow,” she said, and went against the concerns residents have had for decades over the site.

“This just brings up how the process does not work for community members, how pollutive industries have too much power, even over our governments,” O’Brien said.

According to a letter from Scott Helberg, Northern Metal’s chief operating officer, construction delays caused by “extreme weather-related conditions” and lack of utility connections prevented the Becker plant from opening on time. The MPCA questioned the claim, stating the Becker facility is operational and that any delays had no impact on its ability to shut down the north Minneapolis facility.

“Northern Metal Recycling is pleased with the guidance from the court,” Helberg said in a statement Wednesday. “As we continue to work closely with the City of Becker to obtain all necessary utilities, we are excited about the future.”

O’Brien said she wanted to know why the Becker facility wasn’t ready when Northern Metal knew for years they had to relocate by August. “I don’t understand how our community is paying the price for whoever dropped the ball,” she said.

Minneapolis residents fought to move the company out of north Minneapolis, claiming air pollution from the shredder was making them sick. In 2014, the MPCA found that the air around the shredder contained high levels of air pollutants linked to a variety of health problems, including increased risk of heart attacks, bronchitis and asthma.

In the 2017 settlement, Northern Metal agreed to relocate its plant and pay $2.5 million in cost and penalties.