WINNIPEG, Manitoba/CALGARY, Alberta—Fears about oil spills into the Great Lakes from two aging U.S. pipelines have flared, raising doubts about their future and creating fresh headaches for operator Enbridge Inc. (NYSE: ENB) and the Canadian energy sector.

Canada has faced years of delay in getting new oil pipelines built because of environmental opposition, resulting in severe congestion in Alberta, the country’s main crude-producing province, that forced the provincial government to impose production cuts this year. Pipelines face increasing scrutiny from environmental groups worried about leaks, and U.S. Great Lakes states are taking a hard look at the risks.

The Minnesota Court of Appeals ruled on June 3 that the environmental impact statement for Enbridge’s Line 3 failed to properly address the spill risk in Lake Superior, imposing a fresh challenge to the company’s construction schedule. Also last week, Michigan Gov. Gretchen Whitmer repeated a threat to shut down Line 5 unless Enbridge accelerated its timeline to replace it.

“That is a real-time problem because (Line 3) was the most imminent chance for Canadian production to see some pressure release on the system,” said Rafi Tahmazian, senior portfolio manager at Canoe Financial, which owns shares of Canadian Natural Resources and other oil producers. “It’s disappointing and concerning.”

Enbridge shares dropped 5% in Toronto last week, hovering near a three-month low.

Line 3 carries oil from Alberta to U.S. refineries in Minnesota and Wisconsin. Line 5 takes oil from Wisconsin to refineries in Sarnia, Ontario, passing through the Straits of Mackinac channel connecting Lake Michigan and Lake Huron. Both were built in the 1960s.

In a statement on June 7, Enbridge said it was still analyzing the court’s decision on Line 3.

Without a valid environment statement, Enbridge’s certificate of need and route permit, which it received from the Minnesota Public Utilities Commission (PUC) a year ago over boisterous opposition, are void.

Minnesota’s Department of Commerce and Enbridge must now re-draft the statement to the PUC’s satisfaction, a process likely to take at least six months, said Alexandra Klass, a University of Minnesota law professor.

Enbridge has previously said it expects to have the remaining Minnesota permits for Line 3 by November and will put it into service in the second half of 2020. It has not said how the appeal court’s ruling may now affect that plan.

“As of now they do not have any valid state permits,” Klass said. “I don’t know their construction schedule, but it does seem ambitious.”

PUC officials declined to comment.

With no valid environment statement, Minnesota’s natural resources department and pollution control agency cannot issue the required state permits either, said Scott Strand, lawyer for the Friends of the Headwaters environmental group.

“It doesn’t seem likely that the calendar can just stay in place,” he said.

The Minnesota Pollution Control Agency must issue Line 3’s water quality certification by Oct. 30 or Enbridge would need to re-apply, re-starting a year-long process, said spokesman Darin Broton.

Minnesota’s Department of Natural Resources said in a statement that it was determining its next steps.

In Michigan, Enbridge said it is taking legal action regarding Line 5 to enforce agreements with a previous Michigan administration that allowed it to build a tunnel under the Straits to replace an underwater section of pipe. The governor has said she fears anchors from boats could rupture the existing pipe.

Whitmer’s insistence on shutting down Line 5 in two years, ahead of the 2024 completion date for the tunnel, led to Enbridge’s legal action, the company said.

Whitmer wrote to Enbridge CEO Al Monaco on June 3 saying that she wants a firm date to shut down the underwater portion of the pipeline, and that the state could otherwise shut down Line 5. She did not comment further on June 7.