A Texas oil company was granted permission to repair an underwater pipeline that ruptured off the coast of Southern California a year ago, spilled tens of thousands of gallons of crude, and forced beaches and fisheries to close.

The U.S. Army Corps of Engineers granted the approval Friday to Amplify Energy Corp., clearing the way to rebuild the aging pipeline that burst months after it was apparently weakened when it was snagged by the anchors of ships adrift in a storm.

The Oct. 1, 2021, rupture spilled about 25,000 gallons (94,600 liters) of oil into the Pacific Ocean, closed miles of beaches for a week, shuttered fisheries for months and coated birds and wetlands in oil.

The approval to rebuild the pipe running from an oil rig off Huntington Beach to tanks in Long Beach comes less than a month after Amplify pleaded guilty to federal charges of negligently discharging oil. The Houston-based company and two subsidiaries also agreed to plead no contest in state court to polluting water and killing birds.

Amplify said the approval will allow it to remove and replace the damaged segments of pipe from the ocean floor.

It estimated the work would take up to a month after a barge is in place. If it passes a series of safety tests after being fixed, the company said it expected to begin operating in the first quarter of 2023.

FILE – This still image from video taken Oct. 4, 2021, and provided by the U.S. Coast Guard shows an underwater pipeline that spilled tens of thousands of gallons of oil off the coast of Orange County, Calif. The U.S. Army Corps of Engineers granted the approval Friday, Sept. 30, 2022, to Amplify Energy Corp. to repair the pipeline. The Houston company pleaded guilty to federal charges last month of negligently discharging oil. (U.S. Coast Guard via AP, File)

Environmentalists who want the pipeline shut down criticized the permit approval and renewed calls to put an end to offshore oil operations.

“The Biden administration just ramped up the risk of yet another ugly oil spill on California’s beautiful coast,” said Brady Bradshaw of the Center for Biological Diversity. “Unfortunately, people living near offshore drilling infrastructure are all too familiar with this abusive cycle of drill, spill, repeat.”

On Wednesday, the environmental group sued the federal government for allowing the platform where the pipeline originated to operate under outdated plans that indicated the platform should have been decommissioned more than a decade ago. The lawsuit also said the Bureau of Ocean Energy Management failed to review and require plan revisions, despite the spill.

Amplify contended that the spill wouldn’t have occurred if two ships hadn’t dragged their anchors across the pipeline and damaged it during a January 2021 storm. It said it wasn’t notified about the anchor snagging until after the spill.

FILE – Workers in protective suits clean the contaminated beach at Newport Beach, Calif., on Oct. 6, 2021, following a pipeline rupture that spilled tens of thousands of gallons of crude oil off the Southern California coast. The U.S. Army Corps of Engineers granted the approval Friday, Sept. 30, 2022, to Amplify Energy Corp. to repair the pipeline. The Houston company pleaded guilty to federal charges last month of negligently discharging oil. (AP Photo/Ringo H.W. Chiu, File)

While the size of the spill was not as bad as initially feared, U.S. prosecutors said the company should have been able to turn off the damaged line much sooner had it recognized the gravity of a series of leak-detection alarms over a 13-hour period.

The first alarm sounded late on the afternoon of Oct. 1, 2021, but workers misinterpreted the cause, according to the federal plea agreement.

When the alarm sounded throughout the night, workers shut down the pipeline to investigate and then restarted it after deciding they were false alarms. That spewed more oil.

It wasn’t until after daybreak that a boat identified the spill and the line was shut down.

As part of a federal court agreement to pay a $7 million fine and nearly $6 million in expenses incurred by agencies including the U.S. Coast Guard, the company and subsidiaries agreed to install a new leak-detection system and train employees to identify and respond to potential leaks.

The company agreed to plead guilty to six state misdemeanor charges and pay $4.9 million in penalties and fines as part of a settlement.