SACRAMENTO, Calif. — A generator on a marijuana farm is to blame for a fire last year that destroyed a dozen homes south of San Francisco, investigators said Thursday.

It’s the latest in a string of fires at marijuana growing sites in the past several years that have caused wildland firefighters to take increased precautions. The Santa Clara County Sheriff’s office is still investigating whether the pot growing operation in the Santa Cruz Mountains was legal.

California Department of Forestry and Fire Protection investigators determined that the fire that destroyed 28 structures, including 12 homes, was caused by one of three portable generators used at the pot farm. The fire burned about seven square miles over 16 days in September and October, forcing the evacuation of hundreds of residents from Santa Cruz and Santa Clara county neighborhoods.

It was one of four wildfires linked to marijuana grows last year, CalFire spokeswoman Janet Upton said.

In nearby Monterey County, firefighters last year rescued several pot farmers who were trapped for three days by a fast-moving wildfire that destroyed 900 plants.

Police said they could make no arrests in that blaze because the evidence went up in smoke.

There were at least five pot-related fires in 2015, including a blaze that burned about 108 square miles in Lake, Yolo and Colusa counties north of San Francisco. The fire that destroyed 43 homes and 53 outbuildings was caused by a faulty water heater that was strapped to a tree at an illegal marijuana farm east of Clearlake.

No fires this year are known to be caused by pot grows.

Even when there are no fires, forestry and wildlife officials are cautious about stumbling across booby-traps or armed guards protecting illegal pot grows in certain areas of the state, Upton said.

“It’s rare nowadays that we send someone alone out into the woods, so that is a change,” she said.

The designated safety officers also have to take into account the possibility of contact highs, though to date no equipment operators have been pulled off the line because of exposure to marijuana smoke.

Inmate firefighting crews are kept out of areas with known marijuana grows, she said.