Chevron said in a statement the fire started at 6:15 p.m. Monday at 4 Crude Unit; it was contained by 10:30 p.m.

Company spokesperson Heather Kulp said the fire was contained, but she could not say when firefighters would be able to put the fire out.

Even with the blaze contained, smoke continued to pour from the facility in Richmond. The fire sent flames with thick black smoke out of at least two refinery stacks and over Richmond and San Pablo, about 10 miles northeast of San Francisco.

Kulp said officials are trying to determine what caused the fire.

Contra Costa County Health Services lifted the shelter-in-place for residents around 11:30 p.m.

When the fire started, health services advised residents who could smell the smoke to stay inside and avoid the area. The smoke could cause eye, throat and respiratory irritation.

An automated phone message was sent out by Contra Costa Health Services, which stated that there has been an emergency at the refinery.

"Go inside. Close all windows and doors," the message said. It advised residents to turn off heaters, air conditioners and fans, and to cover cracks around doors with tape or damp towels.

California Department of Health Dr. Rick Kreutzer said the county had four mobile monitoring units in the area that tested for harmful particulates, like sulfur containing compounds. He said the units did not detect any of the substances on the ground; they seemed to have gone straight into the air.

Toll takers at the Richmond San Rafael Bridge were told to flee their booths and take shelter in the offices. Drivers heading westbound were told to roll up their windows and not stop to pay toll.Chevron released the following statement:

A fire started at our 4 Crude Unit at 6:15 pm today. At this time we do not have details about the cause of the incident. All employees have been safely accounted for and there are no injuries.

We have comprehensive plans and procedures in place to respond to situations like the one we are facing. We are working with all appropriate local authorities.

We will take all measures necessary to provide for the safety and security of our facilities and the surrounding community.

We are responding to this incident as quickly as we can and are deploying highly trained personnel to assess and manage the situation.

We will not speculate on the cause of this incident. Our priority right now is containing the fire and protecting the health and safety of our employees and community.