The Obama administration on Thursday blocked development of a copper and nickel mine near a popular wilderness area in northern Minnesota, saying the project could poison the vast web of lakes, streams and wetlands that crosshatch the region.

Acting with just five weeks left in the administration, federal agencies refused to renew leases held by a mining company just outside — and upstream from — the Boundary Waters Canoe Area Wilderness, along the Canadian border. Officials also took steps that could lead to a much larger area being put off limits to mining.

The company, Twin Metals Minnesota, sued the government in federal court in September, anticipating a possible rejection and arguing that it had an absolute right to the lease renewals. Twin Metals, a subsidiary of Antofagasta of Chile, one of the world’s largest mining firms, has said it had planned to invest more than $5 billion in building the mine.

It was not clear whether the incoming Trump administration, which has vowed to eliminate regulations that hinder economic development, would try to reverse the decision.