SANTA BARBARA, Calif. — Thousands of firefighters continued corralling two of the biggest wildfires in California history on Monday as dangerous weather that threatened to roll back recent gains turned out to be far milder than forecast.

As temperatures cooled and winds calmed over the weekend, firefighters gained ground on the LNU Lightning Complex fire, burning across a fatigued wine country north of San Francisco, and the SCU Lightning Complex, which has been threatening the eastern outskirts of San Jose and cities as far south as Gilroy.

But forecasts had predicted a new round of so-called dry lightning: thunderstorms that produce little if any rain but much electricity. By midday, though, those storm cells had blown past the Bay Area harmlessly and the National Weather Service canceled a “red flag” fire warning for the region.

The two complex fires, which comprise several blazes each, began 10 days ago when thousands of lightning strikes hit dry vegetation. The fires have grown to be the second- and third-largest fires in terms of acreage burned in state history. Of the more than 600 smaller fires burning in the state, 17 are designated as major, tugging fire crews in several directions simultaneously.

The fires already have charred 1.2 million acres — an area larger than Rhode Island — and have killed seven people and destroyed more than 1,200 buildings. More than 100,000 people have evacuated their homes over the course of the recent fires amid fears that gathering in shelters could increase the spread of the coronavirus in the state with the most reported cases.

President Trump declared a major disaster in the state over the weekend, which freed up federal aid that he once threatened to withhold because of what he has described as poor forest management. Many of the state’s woodlands, including some areas burning now, are managed by the federal government.

In a midday briefing, Gov. Gavin Newsom (D) on Monday thanked Trump for the declaration. He described this as “a critical week” for firefighting efforts, with forecasts calling for considerably cooler weather but unpredictable winds.

“We’re deploying every resource we have right now,” Newsom said.

Firefighters from across the state, as well as the National Guard, have been stretched thin by the number of blazes, which have come well before the state’s traditional peak fire season in the fall. A climate of extremes here in recent years — wet winters and springs followed suddenly by hot, dry summers — has virtually erased the time frame for what had for decades constituted fire season.

In his briefing, Newsom said the state had experienced 4,292 fires, which burned a total of 56,000 acres, by this time last year. This year the total acreage charred so far is 1.4 million. There have been 7,002 fires, a 63 percent increase from the previous year.

Though more than 14,000 firefighters are confronting the flames, the sheer number of outbreaks and sweeping, ember-carrying winds have left crews playing catch-up for days. Seven states have sent fire engines to California despite their own worries that dry, hot and windy conditions at home will spark similar blazes.

California also is somewhat shorthanded because crews of prison inmates, numbering 28 each, usually help fight such fires by clearing brush ahead of the flames to create breaks and carrying out other essential tasks.

More than 8,000 inmates have been released early this year because of a severe covid-19 outbreak in the state prison system. Inmate crews have been reduced in size, state fire officials say. The work, while sometimes hazardous, is voluntary, pays nominally, and goes toward a prisoner’s credit for early release.

As Monday began, fire officials appeared most worried about the shifting winds, which in the northern LNU fire threatened to push flames toward the Sonoma County towns of Healdsburg and Guerneville, both popular wine-country tourist destinations. That fire is now nearly a quarter contained.

The same was true of the smaller CZU Lightning Complex fire that is the southwestern-most of three major Bay Area fires, having burned more than 50,000 acres in Santa Cruz and San Mateo counties, including historic coastal Redwood groves.

Newsom said such “dense forests . . . are historically immune from significant fires along our coast.”

“This is a region that has simply never seen forest fires because of the weather conditions,” said Newsom, who spent part of the weekend visiting that area. “It is a proof point that we are in a different climate and we are dealing with different climate conditions that are precipitating fires the likes of which we haven’t seen in modern recorded history.”

Although lighter than predicted, winds threatened to push embers and flames through forests toward several small mountain and coastal communities. A heavy fog layer that persisted for much of the weekend helped moisten the fire’s fuel and curtail its spread.

Many residents of the mountainside town of Bonny Doon, north of Santa Cruz, have defied evacuation orders to remain in threatened areas to protect their homes. The fire is 13 percent contained.

Fire officials have warned that, while they are optimistic about the changing weather, they will likely be fighting the largest blazes for weeks. Many crews are working 72-hour shifts, three times longer than normal between rests.

Those not directly threatened by the fires are still suffering from the effects of smoke, which has drifted at least as far east as Nebraska.

Many parts of California are experiencing hazardous air quality conditions, and local health officials have warned residents in several counties to remain indoors as much as possible.

In the Central Valley, scorching hot this time of year, smoke is complicating efforts to treat covid-19 cases in what remains the state’s hardest-hit region.

Newsom said most of the fire evacuees are staying in hotel rooms, family homes and other places outside official shelters, where people are screened for the virus and required to wear masks. He said the state faces a shortage of air purifiers that help circulate the air inside the shelters and lessen the risk of the virus’s spread.

“This makes some of our wildfire fighting efforts a little more challenging,” Newsom said. “But we are up to the task.”