SONOMA, Calif. — As wildfires tore through Northern California wine country last week, the dire news piled up: buildings destroyed, workers displaced, precious housing stock lost. A fragile economy, at the mercy of nature even in a normal season, was threatened.

But as the smoke has begun to clear in recent days, those who depend on grape-growing and winemaking for a living have been relieved to find that the fires largely spared one crucial element in their path: the vineyards.

Throughout the most beleaguered parts of Napa and Sonoma Counties, the fires have left scorched, blackened fields and the occasional smoldering log. Almost invariably, though, they have left vineyards, the region’s most precious resource, intact, with at worst a singeing around the fringes.

“It’s in way better shape than I ever imagined,” said Erich Bradley, the winemaker at Repris, in the Moon Mountain district outside this small city, who with the help of an electric generator was testing results of fermentations that had continued in his absence. The fires had approached but did not harm the buildings or vineyards. “It’s just a miracle,” he said.