BISMARCK, N.D. (AP) — TC Energy’s Keystone pipeline leaked an estimated 383,000 gallons (1.4 million liters) of oil in northeastern North Dakota, state regulators said Thursday.

Crews on Tuesday shut down the pipeline that carries tar sands oil from Canada through seven states after the leak was discovered said Karl Rockeman, North Dakota’s water quality division director. It remained closed Thursday.

The Calgary, Alberta-based company formerly known as TransCanada said in a statement the leak affected about 22,500 square feet (2090.3 sq. meters) of land near Edinburg, in Walsh County.

The company and regulators said cause was being investigated.

“Our emergency response team contained the impacted area and oil has not migrated beyond the immediately affected area,” the company said in a statement.

North Dakota regulators were notified late Tuesday night of the leak. Rockeman said some wetlands were affected, but not any sources of drinking water.

Regulators have been at the site since Wednesday afternoon monitoring the spill and cleanup, he said.

Crude began flowing through the $5.2 billion pipeline in 2011. It’s designed to carry crude oil across Saskatchewan and Manitoba, and through North Dakota, South Dakota, Nebraska, Kansas and Missouri on the way to refineries Patoka, Illinois and Cushing, Oklahoma.

It can handle about 23 million gallons daily.

The pipeline spill and shutdown comes as the company seeks to build the $8 billion Keystone XL pipeline that would carry tar sands oil from Alberta, Canada, to refineries in Texas. The proposed Keystone XL pipeline has drawn opposition from people who fear it will harm the environment.

President Donald Trump issued a federal permit for the expansion project in 2017, after being rejected by the Obama administration.

Together, the massive Keystone and the Keystone XL network would be about five times the length of the trans-Alaska oil pipeline.

The original Keystone is designed to carry crude oil across Saskatchewan and Manitoba, and through North Dakota, South Dakota, Nebraska, Kansas and Missouri on the way to refineries in Patoka, Illinois, and Cushing, Oklahoma. It has experienced problems with spills in the past, including one in 2011 of more than 14,000 gallons (53,000 liters) of oil in southeastern North Dakota, near the South Dakota border.

In 2017, the pipeline leaked an estimated 407,000 gallons (1.5 million liters) of oil onto farmland in northeastern South Dakota, in a rural area near the North Dakota border. The company had originally put the spill at about 210,000 gallons (795,000 liters).

Federal regulators said at the time the Keystone leak was the seventh-largest onshore oil or petroleum product spill since 2010.

North Dakota’s biggest spill , and one of the largest onshore spills in U.S. history, came in 2013, when 840,000 gallons (3.1 million liters) spilled from a Tesoro pipeline in the northwestern part of the state. The company spent five years and nearly $100 million cleaning it up.

The Sierra Club pounced on the latest spill as an example of why the Keystone XL should not be built.

“We don’t yet know the extent of the damage from this latest tar sands spill, but what we do know is that this is not the first time this pipeline has spilled toxic tar sands, and it won’t be the last,”