CHICO, Calif. — The first major rainstorm in months brought misery and jubilation Wednesday to a region of Northern California decimated by a firestorm that raced through towns in the Sierra Nevada foothills and sent choking smoke across a large swath of the state.

The rain, which was expected to intensify on Thursday, is helping to extinguish the so-called Camp Fire, the deadliest in the state’s history, firefighters said. By Wednesday afternoon, the storm had already cleared the air of smoke that had closed many schools.

But the rain also brought potentially treacherous conditions to firefighters working in steep ravines as they try to stamp out the fire’s remnants, said Scott McLean, the deputy chief of the California Department of Forestry, known as Cal Fire. And it multiplied the suffering of the evacuees, some of whom have been living outside.

“I’ve had mice in my tent, spiders, it’s freezing at night and now this rain,” said Amy Sheppard, 38, who lost everything when the firestorm swept through the town of Magalia. She is sleeping in a tent encampment in Chico, the city in the Sacramento River Valley nearest to the destroyed communities. “I’ve been crying so much I can’t cry no more,” she said.