A ruptured pipe dumped enough oil this week into a northeastern Kansas creek to nearly fill an Olympic-sized swimming pool, becoming the largest onshore crude pipeline spill in nine years and surpassing all the previous ones on the same pipeline system combined, according to federal data.

The Keystone pipeline spill in a creek running through rural pastureland in Washington County, Kansas, about 150 miles (240 kilometers) northwest of Kansas City, also was the biggest in the system’s history, according to U.S. Department of Transportation data. The operator, Canada-based TC Energy, said the pipeline that runs from Canada to Oklahoma lost about 14,000 barrels, or 588,000 gallons.

The spill raised questions for environmentalists and safety advocates about whether TC Energy should keep a federal government permit that has allowed the pressure inside parts of its Keystone system — including the stretch through Kansas — to exceed the typical maximum permitted levels. With Congress facing a potential debate on reauthorizing regulatory programs, the chair of a House subcommittee on pipeline safety took note of the spill Friday.

A U.S. Government Accountability Office report last year said there had been 22 previous spills along the Keystone system since it began operating in 2010, most of them on TC Energy property and fewer than 20 barrels. The total from those 22 events was a little less than 12,000 barrels, the report said.

“I’m watching this situation closely to learn more about this latest oil leak and inform ways to prevent future releases and protect public safety and the environment,” Democratic U.S. Rep. Donald Payne Jr., of New Jersey, tweeted.

TC Energy and the U.S. Environmental Protection Agency said the spill has been contained. The EPA said the company built an earthen dam across the creek about 4 miles downstream from the pipeline rupture to prevent the oil from moving into larger waterways.

Randy Hubbard, the county’s emergency management director, said the oil traveled only about a quarter mile and there didn’t appear to be any wildlife deaths.

The company said it is doing around-the-clock air-quality checks and other environmental monitoring. It also was using multiple trucks that amount to giant wet vacuums to suck up the oil.

Past Keystone spills have led to outages that lasted about two weeks, and the company said it still is evaluating when it can reopen the system.

The EPA said no drinking water wells were affected and oil-removal efforts will continue into next week. No one was evacuated, but the Kansas Department of Health and Environment warned people not to go into the creek or allow animals to wade in.

“At the time of the incident, the pipeline was operating within its design and regulatory approval requirements,” the company said in a statement.

The nearly 2,700-mile (4345-kilometer) Keystone pipeline carries thick, Canadian tar-sands oil to refineries in Illinois, Oklahoma and Texas, with about 600,000 barrels moving per day from Canada to Cushing, Oklahoma. Concerns about spills fouling water helped spur opposition to a new 1,200-mile (1,900 kilometers) Keystone XL pipeline, and the company pulled the plug last year after President Joe Biden canceled a permit for it.

Environmentalists said the heavier tar-sands oil is not only more toxic than lighter crude but can sink in water instead of floating on top. Bill Caram, executive director of the advocacy Pipeline Safety Trust, said cleanup even sometimes can include scrubbing individual rocks in a creek bed.

“This is going to be months, maybe even years before we get the full handle on this disaster and know the extent of the damage and get it all cleaned up,” said Zack Pistora, a lobbyist for the Sierra Club at the Kansas Statehouse.

Pipelines often are considered safer than shipping oil by railcar or truck, but large spills can create significant environmental damage. The American Petroleum Institute said Friday that companies have robust monitoring to detect leaks, cracks, corrosion and other problems, not only through control centers but with employees who walk alongside pipelines.

Still, in September 2013, a Tesoro Corp. pipeline in North Dakota ruptured and spilled 20,600 barrels, according to U.S. Department of Transportation data.

A more expensive spill happened in July 2010, when an Enbridge Inc. pipeline in Michigan ruptured and spilled more than 20,000 barrels into Talmadge Creek and the Kalamazoo River. Hundreds of homes and businesses were evacuated.

The Keystone pipeline’s previous largest spill came in 2017, when more than 6,500 barrels spilled near Amherst, South Dakota, according to a U.S. Government Accountability Office report released last year. The second largest, 4,515 barrels, was in 2019 near Edinburg, North Dakota.

The Petroleum Institute said pipelines go through tests before opening using pressures that exceed the company’s planned levels and are designed to account for what they’ll carry and changes in the ground they cover. An arm of the U.S. Department of Transportation oversees pipeline safety and permitted TC Energy to have greater pressures on the Keystone system because the company used pipe made from better steel.

But Caram said: “When we see multiple failures like this of such large size and a relatively short amount of time after that pressure has increased, I think it’s time to question that.”

In its report last year to Congress, the GAO said Keystone’s accident history was similar to other oil pipelines, but spills have gotten larger in recent years. Investigations ordered by regulators found that the four worst spills were caused by flaws in design or pipe manufacturing during construction.

TC Energy’s permit included more than 50 special conditions, mostly for its design, construction and operation, the GAO report said. The company said in response to the 2021 report that it took “decisive action” in recent years to improve safety, including developing new technology for detecting cracks and an independent review of its pipeline integrity program.

The company said Friday that it would conduct a full investigation into the causes of the spill.

The spill caused a brief surge in crude prices Thursday. Benchmark U.S. oil was up more modestly — about 1% — Friday morning as fears of a supply disruption were overshadowed by bigger concerns about an economic downturn in the U.S. and other major countries that would reduce demand for oil.

The pipeline runs through Chris and Bill Pannbacker’s family farm. Bill Pannbacker, a farmer and stockman, said the company told him that the issues with the pipeline there probably will not be resolved until after the Christmas and New Year’s holidays.

The hill where the breach happened was a landmark to locals and used to be a popular destination for hayrides, Pannbacker said.