Thousands of California inmates are fighting the wildfires ravaging the state, each earning $1 an hour as they work to contain the fires.

>> Read more trending news

As many as 1,900 inmates at a time are directly fighting fires alongside professional firefighters from the California Department of Forestry and Fire Protection and the Los Angeles County Fire Department, CNN reports.

Others are “on a rest period from being on a fire line or providing backup to fire protection somewhere,” according to Bill Sessa, a spokesman for the California Department of Corrections and Rehabilitation.

Those not fighting fires directly are earning $2 a day. All are drawn from a pool of about 3,800 people who are serving sentences at minimum-security conservation camps across the state.

There are 43 such conservation camps facilities throughout the state. Inmates must apply for the program, which offers less formal penal conditions than serving out their sentence traditionally. Each day of good behavior also translates to two days off their sentence, according to Mashable.