TransCanada Corp. said its original Keystone pipeline has leaked an estimated 795,000 litres of oil in Marshall County, S.D., just days before Nebraska is set to decide the fate of plans to expand the pipeline network.

The company said its crews shut down the Keystone pipeline system Thursday morning between Hardisty, Alta. to Cushing, Okla., and a line to Patoka, Ill. The line is expected to remain shut while it responds to the spill.

Brian Walsh, an environmental scientist manager at the South Dakota Department of Environment and Natural Resources, said the state has sent a staff member to the site of the leak in a rural area near the border with North Dakota about 402 kilometres west of Minneapolis.

"Ultimately, the cleanup responsibility lies with TransCanada, and they'll have to clean it up in compliance with our state regulations," Walsh said.

Environmental groups seize on spill

The leak comes as the Nebraska Public Service Commission is set to vote on the Keystone XL sequel on Nov. 20 to clear the last major regulatory hurdle for the $8 billion project. Keystone XL would route the pipeline on a more direct path through Montana and South Dakota to Nebraska, where it would connect with existing pipelines that feed Texas Gulf Coast refineries.

No matter what TransCanada says, there's no such thing as a safe fossil fuel pipeline. - May Boeve, 350.org executive director

American environmental groups seized on the spill as evidence that their warnings against Keystone XL would come to pass. Among the groups, 350.org, which helped launch national protests against the project in the U.S.

"This is exactly the kind of disaster we can expect more of if Keystone XL is approved," said the statement from 350.org executive director May Boeve. "No matter what TransCanada says, there's no such thing as a safe fossil fuel pipeline."

Among other concerns, opponents of Keystone XL say the pipeline would pass through the Sandhills, an ecologically fragile region in Nebraska of grass-covered sand dunes, and would cross the land of farmers and ranchers who don't want it.

'TransCanada is making our case for us'

"Just days before the Nebraska Public Service Commissions decides on whether to approve Keystone XL we get a painful reminder of why no one wants a pipeline over their water supply," said Greenpeace campaigner Mike Hudema.

The Sierra Club was also quick to condemn the spill, urging the commission not to vote for the project.

It's a story of dark money, dirty politics and powerful people...When Donald Trump gave TransCanada the nod to build a pipeline that would carry Canadian crude oil to the Gulf of Mexico, it seemed like liquid gold for the Alberta-based company. But a group of angry farmers and activists in mid-western American states are trying everything they can to stop the 'ugly Canadians' from digging a pipeline and running oil through their beloved farmlands. But is anyone listening? Bob Mckeown investigates TransCanada’s influential allies in Washington and the deal to build Keystone XL. 45:42

"We've always said it's not a question of whether a pipeline will spill, but when, and today TransCanada is making our case for us," said campaign director Kelly Martin.

Kent Moeckly, a member of conservation and family agriculture group Dakota Rural Action, who opposed the Keystone pipeline, said he drove to land he owns near the site of the spill Thursday.

Dwindling demand for oil

"There's a heck of a south wind up here today, and man it just stunk of crude oil," said Moeckly, whose property is crossed by the pipeline. "A mile away, but I'll tell you it was like it was next door."

After years of delay, and rejection by Barack Obama, the Keystone XL project was given the go-ahead by President Donald Trump this year, but it's still mired in economic and legal problems.

In addition to the regulatory process in Nebraska, it faces dwindling demand for oil that has already prompted TransCanada to cancel its biggest Canadian project, Energy East.