(Reuters) – A U.S. regulator on Tuesday ordered that a segment of the Keystone pipeline that spilled more than 9,000 barrels of crude in rural North Dakota remain shut until operator TC Energy submits a restart and return-to-service plan because of the hazards posed. The corrective action order by the U.S. Pipeline and Hazardous Materials Safety Administration (PHMSA) finds that continued operation of the affected pipeline segment, between Edinburg and the pump stations near Niagara, North Dakota, without corrective action is or would be hazardous to life, property, or the environment. The 590,000-barrel-per-day Keystone pipeline system is a vital artery for Canadian heavy crude, imported by the United States for blending with other oils and refined into gasoline, diesel and other fuels. The restart and return-to-service plan, which is among the order’s directives, must specify any appropriate pressure restrictions to ensure safety of the segment of pipe that leaked, according to the order. TC Energy is also required to test the failed pipeline section before a potential restart and submit a remedial work plan that would lay out all the factors that contributed to the failure. TC Energy did not immediately respond to a request for comment. “After considering the age of the pipe, the circumstances surrounding the failure, the hazardous nature of the product being transported, the pressure required for transporting the material, the other recent failures of the Keystone Pipeline in 2016 and November 2017, …. I find that a failure to issue this Order expeditiously to require immediate corrective action would result in likely serious harm to life, property, and the environment,” PHMSA’s associate administrator for pipeline safety, Alan Mayberry, said in the order. In 2017, a Keystone crude pipeline leak in rural South Dakota spilled nearly 6,600 barrels, PHMSA data showed. Earlier this year, Keystone was partially shut after leaking 43 barrels of crude in Missouri. The pipeline also spilled about 400 barrels each in South Dakota in 2016 and North Dakota in 2011. After receiving and analyzing additional data in the course of the investigation, PHMSA said it may identify other corrective measures that need to be taken. Work will begin this week to access the precise point of the pipeline that leaked crude in rural Walsh County, North Dakota, forcing the line to be shut, said Karl Rockeman, director of the state’s Division of Water Quality. There is no estimated timeline for restart of the pipeline.