Ten months after an oil spill hit the coast of California, the operators of the damaged pipeline have agreed to pay nearly $13 million in fines and compensation.

Texas-based Amplify Energy, which operates the pipeline off the coast of Huntington Beach, and its subsidiaries Beta Operating and San Pedro Bay Pipeline announced a settlement with prosecutors on Friday.

They plead guilty to causing the oil spill.

According to the agreement, the companies will pay a fine of $7.1 million.

In addition, the authorities involved in the clean-up of the oil spill will receive compensation of $5.8 million.

Hundreds of thousands of liters of crude oil spilled into the sea through a rupture in an Amplify pipeline in October.

The oil polluted 15 miles of shoreline between Huntington Beach and Laguna Beach south of Los Angeles, popular with surfers and dolphins.

Investigations revealed that a large section of the pipeline had shifted on the seabed, causing a rupture.

Investigators suspect the damage was caused by a ship's anchor.

The nearby container ports of Los Angeles and Long Beach are among the busiest ports in the world.

According to prosecutor Stephanie Christensen, the pipeline's operators also pledged in the agreement to make "significant improvements" to prevent future oil spills.

Accordingly, Amplify wants to install a new leak detection system and intensify inspections on the pipeline.