Updated

Halloween is still more than two weeks away, but in the San Francisco Bay Area, stores are selling masks almost as quickly as they can stock them.

Not Halloween masks, but protective face masks – the type that can shield your nose and mouth from taking in dirty air.

With wildfires raging in the wine country of Northern California, devices called N99 masks have become fast sellers throughout the Bay Area. N95 models aren’t selling bad, either.

“It’s just been so crazy,” San Francisco hardware store owner Matt Rogers told the San Francisco Chronicle. “We told people (who called) we’d be getting them at 9 this morning, and there was a line out the door because the truck was a little delayed.”

Rogers said the 300 masks that arrived Friday sold out in 15 minutes.

The N99 and N95 masks are so named because they can filter out 99 percent or 95 percent, respectively, of particulates in smoky air.

The blazes in California’s wine country have killed at least 40 people and destroyed at least 5,700 homes. Tens of thousands of residents have been evacuated from several counties in Northern California, including Napa, Sonoma and Mendocino.

"It's a horror that no one could have imagined," Gov. Jerry Brown said, after driving past hundreds of "totally destroyed" homes with Sens. Dianne Feinstein and Kamala Harris.

Smoke and ash from the fires have been reaching San Francisco, Oakland and their suburbs, putting Bay Area air quality in recent days on par with notoriously polluted cities like Delhi and Beijing, Business Insider reported.

8bfa2c3c-

A video operator uses a mask as protection against smoke and ash while filming the remains of an apartment building lost in a wildfire two days earlier, Sept. 14, 2015, in Middletown, Calif. (The Associated Press)

The Bay Area Air Quality Management District, which monitors regional air quality and advises Californians on when they can and cannot use the fireplaces in their homes, has been issuing regular smoke advisories on its website as the fires have spread.

As the Environmental Protection Agency's air-quality website stated: “Everyone ... should reduce prolonged or heavy exertion," especially "people with heart or lung disease, older adults, and children."

It also mentioned that the site has been operating slowly lately because of high traffic from people seeking information about the fires.

As the fires have burned on, many Bay Area residents could be seen wearing masks as they walked the streets, Business Insider reported.

Yang Guo told the website that his girlfriend bought a mask for him.

“It was the last one," he said.

The Associated Press contributed to this story.