For well over a week, hundreds of inmates have chain-sawed through relentless thickets of chaparral, cutting lines through the backcountry to thwart the fire's sudden rushes at homes.
On Thursday, they were deep in the Los Padres National Forest, covered in wood grit, soot and sweat, as the Thomas fire continued to grow — becoming the fourth-largest in modern California history.
In the morning, commanders stressed the dangers of the work and urged them to be careful, even while mopping up hot spots, cutting burned trees or striding though charred rubble.
Hours later, a San Diego fire engineer, Cory Iverson, died on the fire lines. The loss rippled through the army of 8,000 fire personnel — both professionals and inmates — on the scene. Some lined the road as Iverson's body was loaded into a hearse and taken from the fire zone.
For 11 days, they've been battling a sharply uneven battle against a devilish fusion of dry wind, fault-crumpled terrain and desiccated vegetation.
Playing some of the hardest roles are the inmate hand crews, which make up about 20% of the firefighters here.
On a ridge above Montecito on Thursday, they worked in crews of 15, leaders shouting orders, scarifying a ribbon of mountain too steep and craggy for any bulldozer.
The winds had abated, as they had many times before, but the inmates were racing the clock, chopping away at ceanothus trunks and gnarled manzanita roots with specialized saws, picks, shovels, rakes, axes.
On Friday night, forecasters predicted Santa Barbara's notorious sundowner winds, which howl down the mountain canyons to the coast, driving flames and embers with them.
Because the wildfire has sprawled so widely, the task of finding the critical points to cut it off had become profoundly difficult.
"This thing is 60 miles long and 40 miles wide,""said Tim Chavez, a fire behavior analyst with the California Department of Forestry and Fire Protection. "There's a lot of fire out there."
No day has been the same on the front lines. On Saturday, the winds calmed. The heat rose in a column, carrying smoke and soot, mushrooming into a pyrocumulus cloud 30,000 feet high. On the ground, it was quiet and still.
Gerardo Moran, 41, and his fellow convicts, thought the worst was over. They were loading the truck about 2 a.m. Sunday to head back to camp and rest, as the temperature dropped.
Then the weight of all that material in the atmosphere collapsed.
A violent downdraft hit the ground and blew in every direction, fanning waves of flame.
"Come on, tools out!" a Cal Fire captain shouted.
"I never knew we were gonna be in the eye of the storm right there," Moran recalled this week. "It's pretty intense — the biggest adrenaline rushes I've ever had, right there on the fire line."
The fire scorched another 50,000 acres during that bout. But Moran and the inmates were able to save a horse ranch of Highway 150, which he was happy about.
Established in 1943, the inmate fire program employs roughly 3,800 prisoners across California, paying them $2 a day in the off-season — when they clear flood control channels and hiking trails — and $1 an hour when they're fighting fires.
"I've always been a fan of the program," said Mark Brown, a deputy fire chief in Marin County and operations commander on the Thomas fire. "They work their butts off."
For the inmates, the danger is obvious — four inmates have died since the program began, including two in the last two years. And some have manipulated the program — in October, an inmate escaped when he walked off the fire line while fighting a blaze in Orange County but was captured on Halloween in Los Angeles.
But most benefit by getting out in the wilderness — away from prison-yard intrigue — learning an occupation, making money, feeling a sense of purpose, and getting time off their sentences.
Proposition 57, passed by voters last year, increased the credit for time served for those in the program.
Inmates who are accepted into the program must undergo physical and mental evaluations ahead of training, according to the California Department of Correction and Rehabilitation. Many types of offenders, such as documented gang members, are ineligible.
Moran began serving a 14-year, four-month sentence in June 2014 for possession of a controlled substance for sale, vehicle theft and assault with a deadly weapon on a peace officer.
In prison, he had to work and show good behavior to get to minimum-security status — and a chance to join the fire camp.
"I figured this would be the best way to serve my community," he said. "And the time off. That's a big one. I got 27 months off my sentence for this. I just want to get back to my family."
He started this year, and fought in the wine country fires in October.
In Ventura County, inmate Lanny Mosley, who is in his third fire season, has been showing Moran the ropes.
Both are "swampers," the unofficial right hand of the state fire captain who manages them on the fire line.
"I've done this long enough to where I trust the captains, they're constantly watching out for us," said Mosley, 52, a second-striker who began his eight-year, four-month sentence for vehicle theft in August 2014.
If something were to happen to the captain, the swamper would be the one to radio for help and manage the situation until others arrived.
Officials said they've seen countless examples of residents waving thank-you signs at inmate crews or coming up to them and thanking them for their work, sometimes knowing who they are, sometimes not.
"It's really rewarding when a crying woman and her children come up to you and say, 'Thank you for saving our homes,' " said Moran. "That's payoff in itself right here. It just feels good."
The occasional misery is worth it.
"Being in the woods, being in the mountains — it's just a freedom that you don't get in prison," Mosley said. "Behind the wall you'll never see the stuff we'll see."
"That view of the stars is amazing," Moran said. "The skyline to the ocean. It's something you wish you were with your family for, but hey, it's OK."