Enbridge Energy Partners has essentially pulled the plug on the controversial Sandpiper pipeline in northern Minnesota, just a few weeks after announcing it’s buying a stake in a different pipeline that doesn’t cross the state.

Calgary-based Enbridge is withdrawing its state application for the $2.6 billion Sandpiper. It’s asking for an end to regulatory proceedings, including work on an environmental-impact statement, according to documents filed Thursday with the Minnesota Public Utilities Commission (PUC).

The Sandpiper pipeline would run from North Dakota’s Bakken oil fields through Minnesota — including pristine lake country — to a terminal in Superior, Wis. The project has drawn fire from environmentalists and American Indian tribes and has been mired in the state’s regulatory process for 2 ½ years.

Enbridge didn’t totally extinguish the idea of building Sandpiper when the oil market rebounds. Mark Maki, Enbridge Energy Partners’ president, told reporters in a conference call that the project “needs to be delayed.”

But he noted that Sandpiper is “outside the company’s current five-year planning horizon.” And by withdrawing its application for the pipeline, Enbridge would have to start over in a regulatory process it has already criticized. “Extensive and unprecedented [regulatory] delays have plagued the Sandpiper pipeline,” Maki said.

In early August, Enbridge announced it was partnering with Marathon Petroleum and buying a $1.5 billion stake in the Bakken Pipeline System, which includes the Dakota Access Pipeline. It will move oil from North Dakota through South Dakota and Iowa to a tank farm in Patoka, Ill., about 70 miles east of St. Louis. The decision came after Enbridge and its partner in Sandpiper — also Marathon — spent about $800 million on costs ranging from pipe to lawyers, the company said.

But the Dakota Access Pipeline is projected to be open by the end of this year. Enbridge doesn’t expect construction on Sandpiper to begin until 2019, if it were to proceed.

Enbridge’s Dakota Access investment immediately put the Sandpiper pipeline in doubt, but the company said in early August it was still evaluating the project.

Last week, the Minnesota Department of Commerce forced Enbridge’s hand. It notified the company that it was effectively suspending work on an environmental-impact statement until Enbridge clarified its Sandpiper intentions.

Sandpiper’s route would pass through the Mississippi River headwaters and lakes plied by American Indians to gather wild rice, sparking fears of damage from a spill. A 2014 study by the Minnesota Pollution Control Agency found that Sandpiper would cross 28 rivers, lakes and wetlands that can’t be reached by nearby roads.

“It put sensitive natural resources at risk in a corridor where no pipeline should be built,” said Kathryn Hoffman, legal director for the Minnesota Center for Environmental Advocacy, which represents Friends of the Headwaters, a Park Rapids-based group. “We are very pleased” with Enbridge’s decision, she said.

Paul Eberth, Enbridge’s Sandpiper project director, said the project had “support from many communities on the route” — and from construction labor unions, which stood to gain a few thousand jobs from the project.

Sandpiper has gone hand-in-hand with plans for another Enbridge pipeline, so-called “Line 3,” a $2.6 billion replacement to carry Canadian crude oil to Superior. The pipeline would be rerouted from its current path — which parallels U.S. Hwy. 2 — to the proposed Sandpiper route.

Enbridge intends to go ahead with the Line 3 replacement and continue to seek regulatory approval, company executives said Thursday.

However, Hoffman said the PUC should reconsider the new route for Line 3 in light of the Sandpiper decision. The two pipelines were a package deal, with Sandpiper providing a pathway for Line 3, she said. “Now, there is no Sandpiper corridor. This is a different proposal now.”

Meanwhile, construction has started on the Dakota Access Pipeline.

In July, it received its final major permits — from the U.S. Army Corps of Engineers. However, the project continues to come under fire from Indian tribes and environmental groups. The Standing Rock Sioux Tribe said the pipeline will damage some sites with historic and cultural significance to the tribe and has sought an injunction.

But Maki said Enbridge doesn’t expect any delays. “Dakota Access is very far along in the process. … They are running according to schedule.”