(CNN) A total of 210,000 gallons of oil leaked Thursday from the Keystone Pipeline in South Dakota, the pipeline's operator, TransCanada, said.
Crews shut down the pipeline Thursday morning, and officials are investigating the cause of the leak, which occurred about three miles southeast of the town of Amherst, said Brian Walsh, a spokesman for the state's Department of Environment and Natural Resources.
This is the largest Keystone oil spill to date in South Dakota, Walsh said. The leak comes just days before Nebraska officials announce a decision on whether the proposed Keystone XL Pipeline, a sister project, can move forward.
In April 2016, there was a 400-barrel release -- or 16,800 gallons -- with the majority of the oil cleanup completed in two months, Walsh said. About 5,000 barrels of oil spilled Thursday.
"It is a below-ground pipeline, but some oil has surfaced above ground to the grass," Walsh said. "It will be a few days until they can excavate and get in borings to see if there is groundwater contamination."
There were no initial reports of the oil spill affecting waterways, water systems or wildlife, he said.
The pipeline was shut down "within minutes" of the company discovering an irregularity, TransCanada said Friday. The spill has been controlled, the company said, with no further environmental impacts observed and no threat to public safety.
TransCanada said it was working with state and federal agencies.
"The safety of the public and environment are our top priorities and we will continue to provide updates as they become available," the company said.
The Environmental Protection Agency is monitoring the situation and will provide resources and assistance if needed, a spokesman said.
"EPA is aware of the spill and is receiving periodic updates from the state of South Dakota, which is overseeing response activity at the spill site," he said.
The Keystone Pipeline system stretches more than 2,600 miles, from Hardisty, Alberta, east into Manitoba and then south to Texas, according to TransCanada. The pipeline transports crude oil from Canada.
The proposed Keystone XL Pipeline, which would stretch from Hardisty to Steele City, Nebraska, would complete the proposed system by cutting through Montana and South Dakota.
The sections of pipeline affected stretch from Hardisty to Cushing, Oklahoma, and to Wood River, Illinois, the company said.
The spill occurred in the same county as part of the Lake Traverse Reservation. The leak location is not on Sioux property, but it is adjacent to it and has historical value, said Dave Flute, tribal chairman for Sisseton Wahpeton Sioux Tribe.
"We want to know how long is it going to take to dig this plume of contaminated soil and how can we be reassured, without a doubt, that it has not and will not seep into the aquifer," he said.
Flute, along with the tribal emergency management director and the manager of the tribal office of environmental protection, arrived Friday morning at the staging area of the leak site to meet with representatives from TransCanada. Flute said he was out there to offer assistance and to understand the cause of the leak and the environmental impacts it might pose.
"We want to find out, was there a crack in the pipe? We don't know. We want to get that information," Flute said. "More importantly, and to stay positive, they did clean up the site, they did contain it."
Environmental activist group Greenpeace said the spill shows the new pipeline in Nebraska should not be approved.
"The Nebraska Public Service Commission needs to take a close look at this spill," said Rachel Rye Butler of Greenpeace. "A permit approval allowing Canadian oil company TransCanada to build Keystone XL is a thumbs-up to likely spills in the future."
In March, President Donald Trump's administration officially issued a permit that approved construction of the Keystone XL Pipeline.
The approval followed years of intense debate over the pipeline amid hefty opposition from environmental groups, who argued the pipeline supports the extraction of crude oil from oil sands, which pumps about 17% more greenhouse gases than standard crude oil extraction. Environmentalists also opposed the pipeline because it would cut across the Ogallala Aquifer, one of the world's largest underground deposits of fresh water.
Tar sands oil is much thicker and stickier than traditional oil, significantly complicating cleanup efforts. The fact it's thicker also means it needs to be combined with other hazardous materials to allow it to be transported in pipelines.
Native American groups have argued the pipeline would cut across their sovereign lands.
Trump said the new pipeline will be a big win for American workers, but critics say it won't be, because most of the jobs would be temporary.
TransCanada said Thursday that the section of the Keystone Pipeline that was leaking was isolated within 15 minutes after a drop in pressure was detected.
According to the South Dakota Department of Environment and Natural Resources' website, this is the third pipeline spill in the state this year. Another came in April when about 84 gallons of crude oil leaked from the controversial Dakota Access Pipeline in Spink County.
That pipeline, which runs through both Dakotas and two other states, drew fierce resistance from the Standing Rock Sioux tribe in North Dakota, the tribe's allies and environmentalists.
Opposition to the pipeline sparked monthslong protests, with as many as 10,000 people participating during the peak of the demonstrations. Clashes with police at the protests turned violent at times, with one woman nearly losing her arm after an explosion last November.