Crews contained nearly 30,000 gallons of crude oil from spilling into the ocean Thursday after a pipeline burst in the Ventura area, officials said.

A hazmat investigation began after units discovered a pipeline had burst about 5:30 a.m. in the Hall Canyon area above the city of Ventura, according to Ventura County Fire Capt. Mike Lindberry.

Ventura County Fire Department

Crews found crude oil flowing into the Prince Barranca, a natural flow of water that leads to the San Buenaventura State Beach near the Ventura Pier.

Firefighters rushed to stop the flow to prevent it from leaking into the ocean. Up to 700 barrels of oil had spilled a half-mile down the barranca but it did not reach the beach, officials said.

Crews capped the spill and were working to clean up the remaining oil with vacuum trucks. Official said the cleanup process could take days.

The spill left a pungent smell in the area as a thick flow snaked below the canyon and soaked into the rocks, dirt and concrete. Fire officials monitored the air quality and said there was no direct impact from the vapors. No evacuations were ordered.

Officials initially reported approximately 210,000 gallons may have spilled but later revised the number.

There was no immediate information on the possible cause.

The spill comes 13 months after a coastal pipeline about 55 miles to the west in Santa Barbara County leaked more than 120,000 gallons of oil.

That pipeline, owned by Plains All American Pipeline, was found to have been corroded.

The Associated Press contributed to this report.

[2016 UPDATED 12/20] 2016 Southern California Year in Photos