As wildfires tore up and down California over the past week, photos and video of prisoner firefighters battling the blaze for pennies drew outrage from observers who noted that as well as being paid practically nothing, inmates on the frontlines of the infernos can't even hope to continue the work after serving time due to harsh state law.

"It's wrong," tweeted former secretary of Housing Julián Castro, who is running for president. "If you can save lives serving a sentence, you can save lives when you're released."

Castro pointed to a new bill in the California state legislature which would allow prisoners to fight fires after their release. The legislation, introduced in March by Democratic Assemblywoman Eloise Reyes, would ask fire departments to allow applicants with criminal records a chance to fight fires as free people.

The treatment of prisoner firefighters angered a number of people who compared the practice to slavery.

Many of those fighting California’s fires are prisoners who are risking their lives & being paid just $2 per day. After finishing their sentences they won’t be allowed to apply for jobs as firefighters. This is modern day slavery. https://t.co/oDjoHNA5TE — Simar (@sahluwal) October 29, 2019

"California fights fires with slave labor," tweeted another.

The cost-saving measures of using prison labor didn't escape immigration attorney Kevin Lo.

"20% of firefighters on the front lines of California's blazes are detained folks," Lo said. "Paid $2 per day and $1 per hour when fighting fires, prison labor saves the state ~$100 million."

20% of firefighters on the front lines of California's blazes are detained folks.



Paid $2 per day and $1 per hour when fighting fires, prison labor saves the state ~$100 million.



After finishing sentences, convictions now bar them from the same job.https://t.co/OKuWFm4kpB — Kevin Lo (@kevinchlo) October 28, 2019

That economic benefit was cited by then-California Attorney General Kamal Harris' office as a reason to keep inmate labor on the fire frontlines in 2014. Harris, now a Democratic Senator, is running for president.