The U.S. federal government issued an order to Plains All American Pipeline to ensure the California coastline is restored after last week's oil spill.

As much as 2,500 barrels of oil was released from Line 901 in Santa Barbara last week, a pipeline owned and operated by Plains All American. About 500 barrels may have reached the waters off the coast of Refugio State Beach in a release the Environmental Protection Agency said was the worst spill in California in the last 25 years.

The U.S. Coast Guard and EPA issues a joint Clean Water Act order to ensure Plains cleans and contains the contamination.

"Our action today is to make sure the oil response work continues until the Santa Barbara County coastline is restored," Jared Blumenfeld, the EPA's regional administrator said in a statement. "Working closely with our local, state and federal partners, we will see this cleanup through to the end."

Responders have rescued brown pelicans and transferred a juvenile sea lion soiled by the spill to an area Sea World for treatment. Area fishing grounds have been closed from the spill and crews are working to remove residual oil from area beaches. Plains said most of the visible sheen was gone.

Patrick Hodgins, senior director of safety at Plains, said preparations were made to send the damaged section of Line 901 to investigators.

"We know that the community is interested in the cause, but we are not in a position to discuss what the pipe looks like — or anything about the affected piece of pipe — until after the investigation is completed," he said in a statement.