(CNN) An oil spill in California on Tuesday created a slick in the ocean that stretched for miles near a popular beach.

Santa Barbara County Fire Department spokesman Capt. Dave Zaniboni said the spill began west of Santa Barbara after a pipeline ruptured and has now moved toward Refugio State Beach. The pipeline responsible has been shut off, he said.

A slick stretched for about 4 miles near Refugio Beach, the U.S. Coast Guard said on Twitter.

Houston-based Plains All American Pipeline was identified as the responsible party, the Santa Barbara County Office of Emergency Management said in a statement.

"Plains shut down the flow of oil in the pipeline and has initiated its emergency response plan," the company said in a statement.

"The culvert has been blocked so no additional oil is reaching the water. Plains is working with local officials and first responders on site to begin clean up and remediation efforts."

It said no injuries had been reported.

"Plains deeply regrets this release has occurred and is making every effort to limit its environmental impact. Our focus remains on ensuring the safety of all involved," it said.

#UPDATE Spill on Refugio Beach stretches approx 4 mi wide. County OES, Exxon and county fire on scene to assist. — USCGLosAngeles (@USCGLosAngeles) May 19, 2015

Officials first got a report of a smell of gas in the area at 11:42 a.m. (2:42 p.m. ET), Zaniboni said.

Photos from CNN affiliate KTLA showed a dark sheen near the beach.

Exxon, Coast Guard, fire & emergency officials responding to slick off Refugio State Beach http://t.co/XR54dfMft6 pic.twitter.com/4lHziIfRgw — KTLA (@KTLA) May 19, 2015

A Coast Guard photo on Twitter showed what officials said was an aerial view of the spill, with black muck along the coastline.

#Update CG overflight photo from Refugio State Beach oil spill pic.twitter.com/MCxtce8xvN — USCGLosAngeles (@USCGLosAngeles) May 20, 2015

County emergency crews and teams from the U.S. Coast Guard and California state parks were working to contain and clean up the spill, he said.