Special retirement benefits once reserved for police, firefighters and others with dangerous jobs are now being given to tens of thousands of state workers employed as park rangers, foresters, dispatchers, coroners, even highway laborers, museum guards and lifeguards.

The trend will add heavily to the $70 billion that state taxpayers owe state retirement funds each year and is costing states such as Florida and Maryland $15 million to $30 million annually, a USA TODAY analysis shows.

Thirty-one states have passed laws since 2000 that expand the range of workers who can retire when they turn 50 or 55 or after working 20 or 25 years, then collect special pensions that will pay some an extra $1 million or more in retirement. The pensions are enhanced because they are usually based on a higher percentage of a worker’s salary than pensions for ordinary state workers.

In Illinois, where highway maintenance workers earn up to $148,000 a year with overtime, early enhanced retirement can pay a $75,000-a-year pension at age 50 after 25 years on the job. That adds up to $2.2 million if the retiree lives to age 80 — or $1.2 million more than if the person had been in the state’s regular retirement plan. A 25-year Florida crime lab analyst can get a $60,000 pension at age 50 and collect $1.8 million by age 80, compared with $575,000 if the person was not in the state’s “special-risk class.”

Read more about states expanding lucrative pensions to more jobs.