Updated

A fire at one of the country's largest refineries spewed thick black smoke over cities in the San Francisco Bay area, sending scores of residents to hospitals complaining of breathing problems early Tuesday.

Doctors Medical Center in San Pablo, a town near the Chevron refinery in Richmond, said about 200 people had sought help and more patients were arriving. Kaiser's Richmond Medical Center also said several dozen people came to the emergency room complaining of shortness of breath, but none was seriously ill.

Residents said they heard loud blasts around 6:15 p.m., when the fire broke out, although Chevron officials could not confirm those reports.

Daniela Rodriguez told the Contra Costa Times that she heard a "big boom" about the time the fire started. The 23-year-old resident said about an hour passed before she received an automated call from Contra Costa County to remain indoors.

"I was feeling kind of nauseous and light-headed (from the smell)," she told the newspaper.

The Chevron Richmond Refinery makes high-quality products that include gasoline, jet fuel, diesel fuel and lubricants, as well as chemicals used to manufacture many other useful products. The blaze started Monday evening when a diesel leak ignited at the refinery's No. 4 Crude Unit, Nigel Hearne, manager of the refinery, told The San Francisco Chronicle.

Randy Sawyer, the chief environmental and hazardous materials officer for the county's health services agency, said any kind of smoke can be toxic, but added: "In this smoke, there can also be all kind of byproducts that can be toxic."

The agency had four teams of inspectors testing air quality, Sawyer said.

The blaze at the plant in Richmond, about 10 miles northeast of San Francisco, was contained by late Monday although it was not immediately known when the flames would be extinguished, said company spokeswoman Heather Kulp.

One employee suffered a minor injury, Chevron officials said.

County health officials used automated calls to warn residents of Richmond, San Pablo and the unincorporated community of North Richmond to "shelter in place," meaning they should not only stay inside, but should also turn off heaters, air conditioners and fans, and to cover cracks around doors with tape or damp towels.

Bay Area Rapid Transit also shut down three stations near the plant for several hours.

To the south, Oakland police issued a community advisory suggesting that residents of the North Oakland Hills area close all windows and doors and turn off air conditioners.

A fire at the refinery in January 2007 injured two workers and spewed low levels of sulfur dioxide and other toxins into the air. County officials said then that it was not enough to harm the health of nearby residents.

During an evening news conference, Hearne apologized "to the community for the fire and smoke this evening at the Richmond refinery."

The refinery is the largest producer of base oils on the West Coast, processing up to 240,000 barrels of crude oil a day, according to the company's website.

The company said Monday it did not know yet whether production would be affected. The 2007 fire shut down the refinery for most of that year's first earnings quarter.