A Minnesota crude oil pipeline with an elevated risk of rupturing finally may get replaced — much to the relief of state officials who for years have warned about its threat to people and the environment.

Enbridge Energy announced this week that it would spend $2.6 billion to replace the U.S. portion of the line by 2017. The 1968-era pipeline carries oil from Canada through northern Minnesota to Superior, Wis.

After a 2002 rupture in Cohasset, Minn., federal investigators concluded that improper shipping of the original pipe left tiny cracks that can turn into big ones. To reduce risk, the pipeline known as “Line 3” operates at roughly half its maximum capacity.

“We are welcoming the retirement,” said Steve Lee, manager of emergency response for the state Pollution Control Agency, which once warned of potentially “frightening” consequences if the line failed near places like the Mississippi River.

Two environmental groups have immediately taken stands against the replacement project. MN350, a ­climate advocacy group, and the Sierra Club said they will fight the Line 3 project because it would shift to carrying the same Canadian tar sands oil as the controversial Keystone XL pipeline proposed through western states.

“We see the line as another tar sands line,” said Tom Mc­Steen, lead convener for MN350, which is loosely affiliated with the activists that have held anti-Keystone protests at the White House. “We are really opposing the extraction of tar sands oil whether shipped by pipeline or oil train.”

Both groups also oppose the expansion of Enbridge’s Alberta Clipper pipeline which carries crude oil through Minnesota from Edmonton along the same corridor as Line 3.

In announcing the Line 3 replacement, Calgary-based Enbridge said it had become expensive to maintain, and that a new line could safely operate at 760,000 barrels per day. The existing line was designed for that capacity, but operates at roughly 400,000 barrels per day. It now carries light crude, but the new line would be dedicated to heavy crude to meet shipper demand from the oil sands region of northern Alberta, said Lorraine Little, an Enbridge spokeswoman.

“The goal of this project is to replace old steel with new steel and new technology, and in the process that creates a newer, safer pipeline,” Little said in an interview Thursday.

Line 3 is an important part of Enbridge’s oil-carrying corridor through the state, which includes five other oil pipelines.

“It provides a vital service that we all rely on,” Little said. “Everyone uses fossil fuels every day, whether they are driving a car or riding a bus. There are so many ways that petroleum-based products interact with our lives.”

Yet the oil corridor through northern Minnesota, which now carries about 14 percent of U.S. needs, is a worry to some activists.

“We are converting Minnesota from the Father of Waters state to the father of oil rivers state,” said Willis Mattison, a retired state pollution control official who is advising a newly formed group called Friends of the Headwaters. It formed after Enbridge ­proposed building the Sandpiper pipeline to carry North Dakota oil across the state, on a ­proposed new route near Park Rapids and Itasca State Park.

Mattison said the group, which has quickly grown to 600 members, was stunned that Enbridge didn’t disclose its Line 3 plans earlier, in tandem with its Sandpiper project now under state regulatory review.

Paul Stolen, a retired state official who formerly reviewed pipeline projects for the Minnesota Department of Natural Resources, said regulators need to study the effects of having more, larger pipelines in the same corridor. He said many pipeline routes, like the Line 3 corridor, were picked in an era when “nobody paid any attention to the environment.” Yet state policy favors using those existing corridors for new lines, he said.

For the Sandpiper line, Enbridge is proposing a new, more southerly path between Clearbrook, Minn., and Superior. Little said the company may consider that route for a new Line 3, which takes a northerly route. Although the Line 3 project will face state regulatory review, it is unclear whether it would be as extensive as that for a new line.

Line 3 has suffered major ruptures, including a July 4, 2002, release of about 6,000 barrels of crude oil in a marsh near Cohasset. Much of the oil stayed in place, and a controlled burn sent smoke a mile high.

An investigation by the National Transportation Safety Board traced the rupture to a pipe seam, the result of a “pre-existing fatigue crack” that probably developed from improper handling during shipment in the 1960s. Enbridge said it stepped up its monitoring and repair program after the accident. Replacing the line will save $1.1 billion in such costs through 2017, the company said.