Airnow.gov

On Thursday morning, the air quality in the Bay Area was worse than in Beijing, which is notorious for having some of the unhealthiest air in the world. In what is being called one of the worst firestorms in California history, smoke heavy with soot continues to blow across the state.

In San Francisco — more than an hour's drive south from the epicenter of the blazes in Santa Rosa — many people are wearing face masks in an attempt to shield themselves from the pollution that hangs like a curtain in the hazy air. The most concerning pollutant is PM2.5, also known as particulate matter. Particulates have a unique ability to penetrate and lodge deep inside the lungs, where they can worsen respiratory issues and trigger asthma attacks.

For people who live in places like Delhi and Beijing, where the air quality regularly reaches or even exceeds the Bay Area's current levels, avoiding the harmful particles is a daily struggle. But Californians accustomed to some of the world's cleanest air are suddenly anxious about the potential health effects of breathing in the smoke, and face masks quickly sold out in local hardware stores this week.

In Sonoma, the center of many of the fires, local Chris Shiery pet his dog Ruby while he waited to evacuate on Thursday as part of a voluntary evacuation order. AP / Rich Pedroncelli

People across Oakland and San Francisco could also be seen wearing masks as they walked to and from work or transit.

Yang Guo, an employee at Citi Bank, said his girlfriend bought the mask he wore in downtown San Francisco on Thursday from Ace Hardware. "It was the last one," he said.

Cole Hardware, another large hardware chain in the Bay Area, was sold out of face masks at all of its locations. "We sold out this morning at 9am sharp," a representative for the store told Business Insider.

Ariel Schwartz, a Business Insider editor who lives in San Francisco, went to Cole Hardware's downtown location on Wednesday evening. The masks were already sold out (she later found one in an emergency kit).

How to protect yourself from the air: Make sure you're wearing the right kind of mask

The best bet for your health is to stay indoors and avoid working or exercising outside when possible. On the Environmental Protection Agency's air quality website, its message to residents is clear: "Everyone ... should reduce prolonged or heavy exertion," especially "people with heart or lung disease, older adults, and children." That's especially tough advice for people with outdoor jobs and the region's homeless.

If you must be outside, wear a mask — and make sure it's the right kind.

"If you have masks available, you should use them," Kristine Roselius, a spokeswoman for the Bay Area Air Quality Management District, told SF Gate.

Dust and surgical masks won't help. Instead, make sure your mask has a particulate respirator, a device that's specially designed to keep out soot and other particles that can cause the most harm. The right kind of mask will be marked as such, with labels that say either "NIOSH-approved," "N95," or "N100."