LOS ANGELES -- The pipeline that leaked thousands of gallons of oil on the California coast was the only pipe of its kind in the county not required to have an automatic shut-off valve because of a court fight nearly three decades ago, a county official said.

The original owner of the pipeline skirted the Santa Barbara County requirement by successfully arguing in court in the late 1980s that it should be subject to federal oversight because the pipeline is part of an interstate network, said Kevin Drude, deputy director of the county's Energy and Minerals Division. Auto shut-off valves are not required by federal regulators.

"It's the only major pipeline that doesn't have auto shut-off," Drude said. "For us, it's routine."

Federal regulators are investigating the cause of Tuesday's leak that spilled up to 105,000 gallons of crude oil from an underground pipe into a culvert and as much as 21,000 gallons into the ocean at Refugio State Beach. The spill killed untold numbers of fish, at least five pelicans and a sea lion. It also mired other wildlife, including an elephant seal, in the muck.

Plains All American Pipeline was still draining the pipe and trying to locate the leak Saturday. Federal regulators ordered the company to remove the damaged section and send it to a lab for tests on the metal, along with a series of other steps before it could resume pumping oil through the pipe to inland refineries.

Plains said the pipeline had one valve to shut it down if oil flowed in the opposite direction and three valves controlled by operators in its Midland, Texas, control room.

Plains defended its people approach to manually shutting down the system, saying it's the standard across the country for liquid pipelines.

"It is much safer for operators who understand the operations of the pipeline to shut it down following a planned sequence of steps than for a computer to automatically close a valve on oil that is travelling in confined space at high pressure," Patrick Hodgins, the company's senior director of safety, said Saturday. "This is all standard operating procedures within our industry."

While it's not known if an auto shut-off valve would have detected the leak and reduced the size of the spill, environmentalists have criticized the lack of such a device, saying it could have averted or minimized the disaster.

"Everyone is pretty mystified why the pipeline didn't automatically shut down when the leak occurred," said Linda Krop, chief counsel of the Environmental Defence Center.

Santa Barbara County regulations sometimes exceed state and federal standards, requiring additional environmental analysis or imposing conditions to further protect health and the environment, Drude said. One additional requirement is a valve that can detect changes consistent with a leak and automatically shut down.

The county successfully fought another operator that didn't want to install automatic shutdown valves on a pipeline from an offshore drilling platform, Drude said.

However, when there was a leak on that line in 1997, an operator overrode the automatic shutdown, and it continued spewing crude into the Pacific Ocean a couple miles from shore. The 10,000 gallon spill fouled 21 miles of shoreline and killed more than 150 birds.

Richard Kuprewicz, president of Accufacts Inc., which investigates pipeline incidents, said such valves aren't always effective, though newer, more sophisticated "smart" models provide more accurate signals that can trigger shutdowns.

A Plains employee discovered the leak early Tuesday afternoon, about three hours after mechanical issues with the pipeline, according to the company. The pipe was restarted for about 20 minutes before a pump failed and then it was shut down because of changes in pressure.

The company said it was looking into whether those earlier problems led to the leak.

A surge in pressure from starting up a system could cause a leak or exacerbate one, but it's too soon to tell, Kuprewicz said.

"In the past, surge pressures have caused pipes to rupture. But there were other failures, too," he said, speaking in general and not about the Plains incident. "If that were the case, that would become fairly evident ... pretty quickly."

Plains All American subsidiaries have reported at least 223 accidents along their lines and spilled a combined 864,300 gallons of hazardous liquids since 2006, according to federal records. The company has been subject to 25 enforcement actions by federal regulators and tallied damages topping $32 million.

The company has defended its record, saying accidental releases have decreased as its pipelines have increased to 17,800 miles.