ANCHORAGE, Alaska (Reuters) - The Trans-Alaska Pipeline, partly owned by BP, shut down on Tuesday after spilling several thousand barrels of crude oil into backup containers, drastically cutting supply down the main artery between refineries and Alaska’s oilfields.

The accident comes at a difficult time for BP -- the largest single owner of the pipeline operator, holding 47 percent -- as it struggles to plug a gushing Gulf of Mexico oil well.

The shutdown followed a series of mishaps that resulted from a scheduled fire-command system test at Pump Station 9, about 100 miles south of Fairbanks, said Alyeska Pipeline Service Co, the operator of the 800-mile oil line.

The power outage triggered opening of relief valves, causing an unspecified volume of crude oil to overflow a storage tank into a secondary containment. There were no injuries, but the approximately 40 people at the work site were evacuated, Alyeska spokeswoman Michele Egan said.

North Slope oil producers have cut their flow into the pipeline’s Prudhoe Bay intake station to 16 percent of their normal rates, Egan said. There is enough storage capacity to allow the line to be shut down for 48 hours as long as producers maintain the 16 percent flow rate, she said.

It is unclear how long the shutdown will last.

“We’re going to take as long as we need to make sure the site is safe before we start back up,” Egan said. Supply problems in the pipeline potentially disrupt tanker shipments to refineries.

The volume of spilled oil is unknown. “We’ve estimated the spill is several thousand barrels,” she said. All has been held within the secondary containment, which has capacity to hold 104,500 barrels, she said. The amount spilled is “nowhere near” the containment area’s capacity, she added.

Alyeska is a consortium owned by five oil companies. Major owners are BP, ConocoPhillips and Exxon Mobil. Unocal and Koch hold minor shares.

The Trans-Alaska Pipeline, which runs from Prudhoe Bay to the tanker port of Valdez, normally ships about 667,000 barrels of oil daily.