An oil company and two of its subsidiaries will plead guilty and pay a fine and restitution for the October oil leak off the Orange County coast.

Texas-based Amplify Energy Corp and its subsidiaries, Beta Operating Co. LLC and San Pedro Bay Pipeline Co., were indicted in December by a federal grand jury.

On Friday, prosecutors indicated that the companies will plead guilty to violating the federal Clean Water Act by negligently discharging about 25,000 gallons of oil into San Pedro Bay on Oct. 1 and 2, 2021, the U.S. Department of Justice said in a news release.

If the plea agreement is approved by a judge, the companies will have to pay a $7.1 million fine, pay $5.8 million to compensate federal programs and be placed on probation for four years while they implement improvements.

These changes include better training for employees and management when it comes to potential leaks, installing a new leak-detection system, conducting semiannual visual underwater inspections of the pipline and more.

“The substantial financial penalties and compliance measures required by the plea agreements demonstrate the federal government’s resolve to punish any entity that causes environmental damage,” Acting United States Attorney Stephanie S. Christensen said in the DOJ release. “This oil spill affected numerous people, businesses and organizations who use the Southern California coastal waters. The companies involved are now accepting their responsibility for criminal conduct and are required to make significant improvements that will help prevent future oil spills.”

During the October leak, which closed beaches and threatened wildlife, Amplify and its subsidiaries received “multiple leak detection alarms,” leading to several shutdowns, though employees then “repeatedly and incorrectly assessed there was no leak and started pumping crude oil through the pipeline again,” the release said.

“As a result of the defendants’ conduct, approximately 588 barrels of crude oil were discharged from a point approximately 4.7 miles west of Huntington Beach from a crack in the pipeline,” the release added.

The plea agreements will require that the $7.1 million be paid in installments over three years, while more than $650,000 of the $5.8 million in costs has already been reimbursed, according to the DOJ.

“Additionally, the defendants previously paid the vast majority of expenses related to the clean-up of the spill,” officials added.