A Texas oil pipeline company responsible for spilling more than 140,000 gallons of crude on the California coast last year has been indicted on dozens of criminal charges, the company said Tuesday.

Plains All American Pipeline and one of its employees face 46 counts of state law violations in the May 19, 2015, spill that initially went undetected until oil began spilling onto a pristine beach on the Santa Barbara coastline and into the ocean.

Initial investigations found the 2-foot-wide underground pipeline was severely corroded where it ruptured on land. Plains said in a statement that the spill was an accident and believes no criminal behavior occurred.

"We will vigorously defend ourselves against these charges and are confident we will demonstrate that the charges have no merit and represent an inappropriate attempt to criminalize an unfortunate accident," the company said.

The spill came two weeks before Memorial Day weekend last year and forced the state to close popular beaches as an oil sheen spread over miles of the Pacific Ocean. It was blamed for the deaths of more than 300 dead animals, including pelicans and sea lions, and sent tar balls drifting more than 100 miles away to Los Angeles beaches.

Plains said 10 counts relate to the spill or reporting it to authorities and 36 relate to dead wildlife. The Houston-based company also faces an investigation into the cause of the spill by federal regulators.

Tests on the pipe had been conducted weeks before the spill, but the results had not been analyzed when it broke.

The California attorney general and Santa Barbara district attorney did not immediately return calls from The Associated Press, but the two scheduled a morning news conference in Santa Barbara.