The Supreme Court sided with Michigan officials on Wednesday in a dispute over the future of a petroleum pipeline snaking beneath a waterway that connects two of the Great Lakes.
In a unanimous decision, written by Justice Sonia Sotomayor, the court held that the company that operates the pipeline had missed the deadline to move the lawsuit into federal court.
The ruling is a victory for Michigan state officials, who have pushed to decommission an aging section of the pipeline. They have raised alarms about a possible environmental catastrophe, and federal courts are often seen as friendlier to business interests than state courts.
Justice Sotomayor wrote that Enbridge Energy, the Canadian company that operates the pipeline, “unquestionably did not meet” a 30-day deadline to move the case, “instead waiting 887 days” after being served the lawsuit to attempt the maneuver.
Although the legal issue in the case was a narrow one — whether the lawsuit would be heard in state or federal court — the dispute had raised broader questions over how much power states have to exert control over the fossil fuel industry. It had also added to the strain in relations between the United States and Canada.
The longstanding battle over the pipeline has also scrambled traditional political alliances in because of the jobs the industry brings to the region.

State officials in Michigan have been pushing to decommission a stretch of pipeline known as Line 5, which runs along the lake bottom of the Straits of Mackinac and links Lake Michigan and Lake Huron, over fears that a leak could cause an environmental catastrophe.
Lawyers for Michigan had warned of the danger of environmental damage from the aging section of pipeline, while a lawyer for the Canadian company told the justices that shutting down the pipeline could raise fuel costs and threaten infrastructure used to provide heat for millions of people.
Line 5 is part of a vast network of lines that carry crude oil and natural gas liquids through Wisconsin and Michigan, before terminating in Ontario. The lines supply refineries and production plants throughout the region.
The disputed section of pipeline sits atop land owned by the State of Michigan and is operated under a 1953 agreement between Michigan and the pipeline company that authorized the company to run the line. Michigan filed suit in state court.
Attorney General Dana Nessel of Michigan has called the aging pipeline “a ticking time bomb in the heart of the Great Lakes.” State officials also argued that the energy company has violated state laws, including the Michigan Environmental Protection Act, asserting that continued operation of the pipeline would most likely cause pollution of water and other natural resources.
At the oral argument before the Supreme Court in February, Michigan’s solicitor general, Ann M. Sherman, had urged the justices to reject the energy company’s request to move the case because of the missed deadline.
John J. Bursch, the lawyer representing Enbridge, countered that the company qualified for an exception to the deadline because it decided to try to move the case only once a federal judge had ruled that another related pipeline lawsuit belonged in federal court. A federal court, Mr. Bursch argued, was the better place to adjudicate issues that cross borders and involve foreign affairs.

