The Minnesota Commerce Department has endorsed Enbridge Energy’s plan to boost the capacity of its Alberta Clipper crude oil pipeline across Minnesota, warning that the state’s two oil refineries face shortages if the project doesn’t go ahead.

The agency backed the controversial project in written testimony for regulatory hearings that began Tuesday in St. Paul. Enbridge seeks approval of $160 million in new or expanded pumping stations to increase the line’s capacity by 40 percent to 800,000 barrels per day.

It is the second expansion of the pipeline, also known as Line 67, which runs 1,000 miles from Hardisty, Alberta, to Superior, Wis., including 285 miles through Minnesota. State regulators last year approved the line’s first capacity expansion. The Phase I construction work already is underway.

Demand by U.S. refiners for Canadian oil is growing faster than existing pipelines’ capacity, forcing Enbridge into a form of rationing, known as “apportionment,’’ that affects new and existing shippers under common-carrier rules, the department said.

“Minnesota’s refineries could lose even their existing supplies of crude oil,” said Laura Otis, an analyst for the department’s energy resources division, in prepared testimony.

Flint Hills Resources’ Pine Bend refinery in Rosemount and Northern Tier Energy’s refinery in St. Paul Park get North Dakota and Canadian crude oil via jointly owned pipelines from Enbridge’s Clearbrook, Minn., terminal.

“Without the Alberta Clipper Phase II upgrade, Pine Bend projects that it will be short crude, which could adversely affect consumers and force the refinery to consider other modes of transport for delivering the crude,” Flint Hills spokesman Jake Reint said in an e-mail.

The Commerce Department’s favorable view of the upgrade is likely to carry weight with state regulators. But it’s a blow to climate activists who oppose this and similar pipelines, like TransCanada’s proposed Keystone XL pipeline through Montana, South Dakota and Nebraska. These pipelines carry heavy oil, known as tar sands or oil sands crude, extracted in Alberta.

Last week, about 300 people rallied in St. Paul against the Minnesota project in a smaller version of the Keystone XL protests staged at the White House. Opponents contend that extracting Canada’s heavy crude oil releases more greenhouse gases — about 10 percent to 17 percent more than conventionally extracted oil, according to two studies.

Yet as Minnesota regulators examine the Alberta Clipper expansion, the main focus is on whether Enbridge can justify the project’s need, which is largely an economic matter. Other concerns raised by environmental groups won’t get as much attention in the state review, including Enbridge’s 2010 pipeline rupture in Marshall, Mich., and the resulting $1.1 billion cleanup of the Kalamazoo River.

“In general, I am not of a mind to litigate Kalamazoo,” Administrative Law Judge Eric Lipman said on the first of three days of evidentiary hearings in St. Paul. “I won’t be able … to resolve the rights or wrongs of those events.”

Enbridge, based in Calgary, faces a separate environmental review by the U.S. State Department because both phases of the Alberta Clipper expansion require a presidential permit to transport more oil across the Canadian-U.S. border. That’s the same permit needed by the Keystone XL pipeline.

At the state hearings in St. Paul, MN350 and the Sierra Club have challenged the Alberta Clipper expansion, arguing that Enbridge has excess pipeline capacity in Minnesota and that the forecast growth in Canada-to-U.S. shipments are overstated. The groups also have raised safety and climate concerns.

But Enbridge contends that existing pipelines from Canada are filling up as more U.S. refineries install technology to refine heavy oil. One of the latest is the BP Whiting, Ind., refinery, the nation’s sixth largest. Flint Hills also has expanded its heavy crude refining capability.

When shipping demand for crude oil exceeds pipeline capacity, common-carrier apportionment rules apply.

“Then everybody gets a smaller portion,” Mark Curwin, Enbridge’s senior director for strategic coordination, said in an interview.

Lipman intends to issue his findings in June. The state Public Utilities Commission later will decide whether to approve the expansion.

Andy Pearson, a coordinator for MN350, said the state’s regulatory process is too focused on supply and demand, and not on the risk of climate change.

“It is a process of a bygone era,” he said. “It is too bad the process hasn’t caught up with reality.”