The fire, which sent plumes of black smoke over the San Francisco Bay area, erupted Monday evening in the massive Chevron refinery about 10 miles northeast of San Francisco. It was out early Tuesday.
The West Coast is particularly vulnerable to spikes in gasoline prices because it's not well-connected to the refineries along the Gulf Coast, where most of the country's refining capacity is located, analysts say.
The Chevron refinery is particularly big and important to the West Coast market, said Tom Kloza, chief oil analyst at Oil Price Information Service.
It produces about 150,000 barrels of gasoline a day -- 16 percent of the region's daily gasoline consumption of 963,000 barrels, he said.
California's average price Tuesday for a gallon of regular gasoline was $3.86. But with inventories in the region already low compared with the rest of the country, pump prices along the West Coast will soon average more than $4 a gallon, Kloza said.
Chevron spokesman Lloyd Avram said he did not have an update on when the refinery could be restarted and declined to comment on what kind of impact the shutdown might have on the gasoline market.
"Spot prices have already increased by as much as 30 cents per gallon in some West Coast markets and that's before the refinery damage has been fully assessed," said analyst Patrick DeHaan of the website GasBuddy.com.
The fire began around 6:15 p.m. Monday in the refinery's No. 4 Crude Unit, about two hours after a vapor leak of hydrocarbons similar to diesel, said Heather Kulp, a Chevron spokeswoman.
"At approximately 6:30 p.m., the volume increased and personnel evacuated the area," she said at a news conference. "The hydrocarbon vapor then ignited and a fire occurred."
Kulp said there were no explosions, and staff at the refinery initiated an emergency response immediately after the fire started. The cause is under investigation.
The black smoke and flames could be seen miles away from the refinery that has long been the target of complaints and lawsuits by people who live near it in Richmond, a mostly low-income community with five major oil refineries.
Mayor Gayle McLaughlin said the fire was unacceptable.
"We live with the day-to-day risk of this type of manufacturing and refining that has an impact on our community with pollutants being released, but with the accident that happened yesterday, that doesn't mean it's acceptable, because it's not," McLaughlin said in a KCBS radio interview.
State workplace safety investigators cordoned off the entire crude unit, and no one was being allowed to enter without approval from the state, said Erika Monterroza, a spokeswoman for California's Division of Occupational Safety and Health, or Cal/OSHA.
"Investigators have notified us that Chevron's emergency response was excellent," Monterroza said.
Three employees suffered minor injuries and were treated at the scene.
Doctors Medical Center in San Pablo, a town near the refinery, said more than 300 people had sought help for eye irritation and breathing problems. The hospital said most of the patients were released after being seen.
Kaiser's Richmond Medical Center said it had assessed and treated more than 350 people with respiratory concerns in its emergency department. No patients were admitted to the facility, said Jessie Mangaliman, a spokesman for Kaiser Permanente.
Air quality officials said the region's 27 monitoring stations detected some increases in pollution.
"Those impacts have now decreased significantly over time since the fire was put out yesterday," said Eric Stevenson, director of technical services for the Bay Area Air Quality Management District, which is responsible for monitoring the site's compliance with air pollution laws.
Stevenson said the impacts were still well under state and federal air quality limits, but air samples were undergoing lab testing for toxins to which people may have been exposed.
Residents said they heard loud blasts around the time the fire broke out, although Chevron officials could not confirm those reports.
Carol Bluitt, who lives just blocks from the refinery, said she's still traumatized from the smoky blaze that darkened the sky for miles and smelled like burning rubber.
"You could clearly tell there was something toxic in the air. My eyes were really, really red and running," said Bluitt, who went to the hospital and began crying in front of her doctors, complaining that her chest was tight.
She said they prescribed eye drops and an inhaler to use every two hours. But she wasn't sure the remedies were helping.
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 that it was not enough to harm the health of nearby residents.
That fire shut down the refinery for most of that year's first earnings quarter.
AP writers John Marshall and Garance Burke contributed from San Francisco. Energy reporters Jonathan Fahey in New York and Sandy Shore in Denver also contributed to this report.