Thomas Rohl adjusted the 30-pound pack strapped to his back and hopped into a nearby fire rig. He was in a remote part of Solano County, on his way to help put out a grass fire smoldering a few miles to the west.

It’s backbreaking, dangerous work. But it beats prison.

“We get to go out on the top of mountains, and the views are insanely beautiful,” said Rohl, 52, who was sent to state prison in 2016 for a drunken-driving collision that put another driver in the hospital. “We work hard, no doubt. But if you have to pay back your debt to society, this is a good way to do it.”

Rohl and minimum-security inmates like him are a firefighting force the state counts on every year when the hills dry up and the weather gets hot. But there’s a problem: Thanks to changes that have redirected many low-risk offenders who used to crowd the state’s lockups, California is heading into the height of this year’s fire season with a reduced number of what one official called “the Marines” of wildfire fighters.

Inmates account for as much as 40 percent of the men and women who battle wildland blazes. Officials say there’s no danger of coming up short on the front lines, but they do acknowledge concern that the number of inmates who sign up for the volunteer duty has dropped by more than 13 percent in the past nine years.

At the Delta Conservation Camp in Suisun City — the home base for inmate crews working primarily in Sonoma, Lake and Solano counties — firefighters had long been broken up into six teams with at least a dozen members each. At times, however, they have been reduced to only five teams, because not enough inmates are joining up.

“It’s a pretty big deal,” said Jeff Johnson, a division chief with the state Department of Forestry and Fire Protection, who has worked with inmate camps across California for 37 fire seasons. “If you lose a whole firefighting crew, that’s 12 to 15 people that aren’t available to be put out there on the fire line.”

There are 218 crews in 29 counties across California dispatched to fight fires in the summer, floods in the winter, and other disasters. The program saves taxpayers millions of dollars annually while low-level offenders —the only inmates eligible to volunteer — earn extra money and spend time in the wild instead of in cells.

In 2008, there were 4,334 inmate firefighters in the program, which is jointly run by Cal Fire and the state Department of Corrections and Rehabilitation. This year, as of July 31, there were 3,740, according to the corrections agency.

The decline has coincided with two measures that together have cut the state prison population by tens of thousands of inmates.

The first was a U.S. Supreme Court order in 2011 to reduce prison overcrowding. California responded with a policy known as realignment, which directed thousands of lower-level offenders to county jails, which don’t participate in the firefighting program.

Then in 2014, the state’s voters passed Proposition 47, which reclassified some nonviolent felonies as misdemeanors punishable by serving time in county jails.

“It’s not surprising numbers (of inmate firefighters) have dropped off, given the impact of realignment and Prop. 47,” said Jonathan Simon, a professor at the UC Berkeley School of Law who specializes in prison policies.

“Realignment was not just a normal public policy shift,” he said. “It carved out a large mass of felonies. ... It’s predictable that, as you have fewer and fewer people going to state prison for low-level crimes, you’ll have fewer prisoners able to volunteer for the firefighting program.”

Officials maintain that current numbers will be sufficient to tackle blazes going into September, historically the worst month of the fire season. Although winter storms ended the drought this year, they also fueled the growth of brush that is ready to burn. Flames have already scorched 219,576 acres across the state, compared with 200,333 at this time in 2016.

The state corrections agency can’t offer the volunteer firefighting duty to county jail inmates, but it is nevertheless stepping up recruitment efforts there. Many people facing felony charges are locked up in county jails while they await trials that can send them to state prison, so corrections officials hand out leaflets, show informational videos and even enlist defense attorneys to advise possible recruits about volunteering.

Inmates on fire crews are paid $2 daily, compared with 8 to 37 cents per hour in state prisons, plus $2 hourly when they are on the lines fighting fires. For each day they work in the program, they receive a two-day reduction in their sentences. In comparison, civilian volunteer firefighters make minimum wage.

The crews save the state about $100 million annually, according to Cal Fire. “If you had to pay minimum wage, the cost of these fires would generally go up quite dynamically,” said Johnson, the agency division chief.

Jose Cruz is one convict who heard about the program through his lawyer. The 38-year-old San Diego resident sold insurance before being convicted of drunken driving. When he was sentenced to three years, he went straight into the firefighting program and has yet to serve a day in a state prison cell. When he’s not out on fires, he’s based at the Suisun City camp.

“I have been one of the lucky ones that didn’t have to experience the real prison lifestyle,” Cruz said. “Being taken from my family was enough for me to change my whole way of life.”

But the work isn’t cushy. The inmates fight fires without water by hiking to remote outposts and clearing dry brush. They must pass a physical test, a two-week training camp and a two-week Cal Fire skills camp. The physical includes running a mile in less than nine minutes, 15 minutes of harbor steps — like a StairMaster — in full gear and a weighted pack, and a timed hike.

“These inmates are the Marines of the fire service,” Johnson said. “When the hose can’t get stretched any more, or the bulldozer can’t go, or even the helicopter can’t reach, these guys have to hike in and physically put a line around the fire to contain it.”

Cruz, who played football in his younger days at San Diego Mesa College, said, “I haven’t done anything physically this hard in 20 years. Fighting fires is way harder than football.”

It took Ariel Morales of Oakland two tries to pass the physical test. The 37-year-old said it was one of the hardest things he has ever done.

“The hiking was what was really difficult for me,” he said. “I’m an Oakland kid. It’s a totally different terrain than a running track. You’re running up and down a mountain with rocks and shrubs and you have to watch your footing. It’s really easy to twist an ankle or break a leg. That’s what tripped me up.”

And the front lines can be dangerous. There have been five inmate fatalities on fire lines since the program was started in the 1940s, three of them since 2016. Last year, an inmate died in Malibu when a boulder fell on her. In May, an inmate was killed by a falling tree while battling a blaze near Hoopa (Humboldt County). And in July, an inmate firefighter died after suffering chainsaw injuries in Lakeside (San Diego County).

“My wife worries all the time, because you can get seriously hurt,” said Isaac Duran, a 28-year-old inmate from Los Angeles. He was convicted of robbery in 2014.

In a fire crew, “you get to see a bunch of California and travel all over the place,” he said. “I’ve been to Humboldt and as far south as Ventura this year. It can be scary when you’re in the middle of a fire in an area you’ve never been before.”

On a humid and hot afternoon in mid-August, inmate crews were driven from Suisun City and down hairpin roads to a rural corner of Napa County where a wildfire had recently been contained. Sweat streamed down the crew member’s faces as they broke up fallen trees with chainsaws and checked the underbrush for embers.

Kristopher Sandy had done this sort of thing before. He served on an inmate crew near San Luis Obispo several years ago, and when he was convicted of burglary in 2009, choosing between another stint fighting fires and sitting in state prison wasn’t hard.

“It impacts morale a lot,” said Sandy, 37. “You are out working in real communities every day rather than being stuck in a prison yard somewhere. It’s the next closest thing to being free.”

Lizzie Johnson is a San Francisco Chronicle staff writer. Email: ljohnson@sfchronicle.com Twitter: @LizzieJohnsonnn