An aerial view shows the darkened ground of an oil spill which shut down the Keystone pipeline between Canada and the United States, located in an agricultural area near Amherst, South Dakota, U.S., in this photo provided November 18, 2017. REUTERS/Dronebase

NEW YORK/CALGARY (Reuters) - The clean-up of an oil spill from TransCanada Corp’s Keystone pipeline may last several weeks, South Dakota’s environmental regulator said on Wednesday, but it is still unclear when the key artery will restart.

Last week, the Keystone system linking Alberta’s oil sands with U.S. refineries spilled 5,000 barrels in rural northeastern South Dakota, four days before neighboring Nebraska voted to remove a big regulatory obstacle for the company’s Keystone XL project.

“We expect it to take several weeks. Our focus is making sure they do that clean-up in accordance with our regulations,” said Brian Walsh, environmental scientist manager for the South Dakota Department of Environment and Natural Resources.

TransCanda has so far recovered 571 barrels of oil, a spokesman said. “Repair plans will be confirmed once we are able to safely expose the impacted section of pipe,” he said, adding that the company is working with the U.S. Pipeline and Hazardous Materials Safety Administration (PHMSA) on a return to service date for the 590,000 barrel per day pipeline.

Refiner Phillips 66, which sources some of its crude from the line, told staff that the pipeline could be shut for as long as four weeks after preliminary indications, according to Energy News Today.

U.S. crude prices remained near a two-year high at $58 after sources said the Keystone pipeline will cut deliveries by 85 percent or more through the end of November. That would effectively reduce shipments by around 7 million barrels of crude, traders say.

The U.S. imports more than 3 million barrels of oil a day from Canada, more than any other country.

U.S. pipeline regulatory officials said on Wednesday they will remain at the site until the pipeline is restarted and a PHMSA spokesman said its personnel will monitor the excavation and packaging of the damaged pipe section for testing.