Officials shut down the controversial Keystone Pipeline after it leaked more than 200,000 gallons of oil in South Dakota Thursday.

Crews initially shut down the pipeline at 6 a.m. Thursday after detecting an oil leak along its South Dakota route. An investigation has been initiated by TransCanada, the pipeline's operator, to find out the cause of the leak.

​"The estimated volume of the leak is approximately 5,000 barrels," a statement on the accident by TransCanada reads. "The section of pipe along a right-of-way approximately 35 miles (56 kilometres) south of the Ludden pump station in Marshall County, South Dakota, was completely isolated within 15 minutes and emergency response procedures were activated."

— Kayleigh Schmidt (@KayleighKSFY) November 16, 2017

​Five thousands barrels translates to roughly 210,000 gallons of oil.

"We have been keeping our shippers and customers up to date and have communicated that the pipeline from Hardisty, Alberta, to Cushing, Oklahoma, and to Wood River/Patoka, Illinois, is expected to remain shut down as we respond to this incident," the statement adds. ​

— Kayleigh Schmidt (@KayleighKSFY) November 16, 2017

​The company also announced that it is working with state regulators and the Pipelines and Hazardous Materials Safety Administration to assess the situation.

The proposed Keystone XL pipeline, an additional branch of the Keystone network, was at the center of a months-long standoff between Native American tribes and developers. When in office, after lengthy deliberation, former US President Barack Obama ultimately rejected the Keystone XL pipeline, saying that the project "would not serve the interests of the United States."

​At the time, Obama cited environmental concerns as the main reason for his rejection of the proposal. US President Donald Trump, however, overrode Obama's decision upon taking office and gave developers a federal permit to continue in their efforts.

"In making his determination that issuance of this permit would serve the national interest, the under secretary considered a range of factors, including but not limited to foreign policy; energy security; environmental, cultural, and economic impacts; and compliance with applicable law and policy," a release from the US State Department said after Trump issued the permit.

TransCanada has had a history of leaks, with its most recent significant accident in April 2016, when 16,800 gallons of oil spilled from the Keystone Pipeline, the largest oil spill that TransCanada had to deal with in the pipeline's first six years. In 2014, a TransCanada pipeline exploded about 15 miles south of the provincial capital of Winnipeg, causing a burn that lasted for more than 12 hours.

In August 2017, just a few short months ago, Greenpeace published a summary on the matter.

"Oil spills anywhere pose serious risks to human health and the environment, and oil spilled into bodies of water is difficult to fully clean up. Diluted bitumen transported from Canada's tar sands fields represents a particular threat to water resources along the routes of proposed pipelines," reads the environmental group's assessment. "Analysis of public data shows that the three companies proposing to build four tar sands pipelines — TransCanada, Kinder Morgan, Enbridge, and their subsidiaries — have seen 373 hazardous liquid spills from their US pipeline networks from 2010 to present."

— Patrick Bonin (@patbonin) November 16, 2017

​"The US crude oil pipeline system as a whole has averaged one significant incident and a total of ~570 barrels released per year per 1000 miles of pipe, over the past 10 years. Assuming these rates, the Keystone XL pipeline could expect 59 significant spills over a 50-year lifetime."