Update: The Bay Area Air Quality Management District issued a Spare the Air Alert for the Bay Area for Thursday and Friday. Read the full story here.

End of update.

The gray haze over San Francisco isn't just summer fog. It's also smoke from a series of wildfires burning on the West Coast, which has pushed air quality into unhealthy levels.

The Air Quality Index for San Francisco Thursday was 152, qualifying as "unhealthy." At this level, even those without respiratory diseases may begin to experience negative side effects, such as coughing, trouble breathing and irritated eyes and airways. Parts of the East Bay, including Oakland and Berkeley, and the South Bay were also in the "unhealthy" air quality range.

READ ALSO: Bay Area weather updates

Smoke from West Coast fires — in Northern California, the Pacific Northwest and British Columbia — spread over the Pacific Ocean and onshore winds are pushing it into the Bay Area, said Daniel Alrick, a meteorologist at the Bay Area Air Quality Management District, by tweet.

On Wednesday the agency extended an Air Quality Advisory for the Bay Area through Sunday.

"Smoke conditions that were forecast to subside, changed due to a deeper than forecast marine layer. Smoke was aloft and mixed down to the surface, due to a deep fog layer and strong onshore winds," an agency statement explained.

The air was so bad in the Bay Area, it was three times worse than that of Beijing, which was at 46 on the AQI Thursday.

The Bay Area Air District recommends residents avoid prolonged exposure to the smoke by remaining indoors with their windows and doors closed.

Read Michelle Robertson's latest stories and send her news tips at mrobertson@sfchronicle.com.

Start receiving breaking news emails on wildfires, civil emergencies, riots, national breaking news, Amber Alerts, weather emergencies, and other critical events with the SFGATE breaking news email. Click here to make sure you get the news.