California Gov. Gavin Newsom has signed a bill allowing prisoners who fight fires while incarcerated to have their records expunged once they're released.

That would clear a path for the inmates to become regular firefighters, something they were unable to do previously.

LIVE UPDATES: DEADLY WILDFIRES RAGE ACROSS WESTERN STATES

The bill, sponsored by Democratic Assemb. Eloise Reyes, lets prisoners who served in a state firefighting camp or on a county fire hand crew apply to the court to erase their convictions so they can qualify as EMTs, Politico reported Friday.

The Golden State has long relied on inmates to fight fires and approximately 3,100 inmates helped keep flames at bay last year.

Inmate firefighters, left, battle the Quail Fire burning near Winters, Calif., on Sunday, June 7, 2020. (AP Photo/Noah Berger)

Amid a devastating pandemic, however -- during which as many as 17,600 inmates were released early by the state prison system -- and nationwide protests for social justice, the state has been facing a firefighter shortage at the same time as a devastating wildfire season.

Weather and climate conditions in California have been far from normal. The state is in the midst of an unprecedented 20-year mega-drought during which temperatures have risen to 130 degrees.

Tinderbox conditions combined with a rare lightning storm lit the first round of major wildfires as a powerful derecho wreaked havoc on Iowa and Illinois, and Hurricane Laura plowed into the Gulf Coast.

So far, more than 3.1 million acres have burned in California -- about 20 times more than last year -- over 6,300 structures have been destroyed, and at least 20 people have died.

About 15,000 firefighters are currently battling 28 major wildfires.

Six of the 20 largest blazes on record have taken place this year, including the second-, third-, and fourth-worst on record. And due to a particularly hot and arid spring -- with the West's warm season heating up by 2 to 3 degrees, causing a long-term moisture deficit -- the fire season has lengthened from four to potentially eight months.

While some law enforcement members and prosecutors oppose the inmate firefighters' bill, the Democratic governor said Friday the law will give them "hope of actually getting a job in the profession that they've been trained."

The bill excludes those convicted of certain crimes, including murder, kidnapping, rape, arson or any felony punishable by death or life imprisonment.

CLICK HERE FOR THE FOX NEWS APP 

That still leaves thousands of prisoners, though, who "want the opportunity because of the training they're receiving, once they're out of the system, to potentially be able to join a workforce of which they've been trained and have actively participated in heroic ways," Newsom told reporters.