Generous pensions have always been a prime perk of government jobs. Now those pensions are causing government layoffs, reduced services and tax increases.

Take Harvey, Illinois. The city has laid off half of its fire department and 13 police officers so it can meet its obligations to its retired police officers and firefighters — the result of decades of overpromising benefits and underfunding pension plans.

The laid-off first responders are just the first casualties of Harvey’s pension crisis. Residents and other government employees will feel the pain as Harvey cuts services, reduces salaries or increases the workloads of its remaining employees. Harvey’s residents already face a property tax increase. Last year, a court ordered the city to impose a property tax levy specifically for its firefighters pension fund.

Unfortunately, Harvey’s pension woes aren’t unique. Disaster looms for state and local pension plans across the U.S.

A report from the American Legislative Exchange Council estimates that state and local pension funds have promised $6 trillion more in benefits than they have set aside to pay. That is $18,676 for every man, woman and child in America, or nearly $50,000 per household.

How did this happen?

Basically, politicians have been quick to grant generous pension benefits but failed to set aside enough money to pay for them. And little or nothing — aside from rare self-imposed funding rules — requires governments to properly fund their promises.

But ultimately, even pension bills fall due. And now that pension plans are running low on money, many state and local governments are grappling with soaring pension costs. Over the past three decades, Illinois’ pension liabilities increased 755 percent while its population edged up only 13 percent.

That has caused taxpayers to take a hit and government services — like Illinois’ education system — to suffer. Recently, 89 cents of every new dollar of education spending has gone not to the classrooms but toward teachers’ retirement costs. By 2025, the state will spend more on retired teachers than it does on those who are actively teaching, as well as all other classroom costs.

Skyrocketing pension costs in Philadelphia already consume 16 percent of the city’s general fund. Some point to those costs as the precipitating factor behind what they say are high taxes, dirty sidewalks, pothole-filled streets and struggling schools.

And there is no doubt that unfunded pensions contributed significantly to bankruptcies in Detroit and other municipalities.

If taxpayers are to avoid paying thousands of dollars more in taxes while receiving fewer government services, and if government employees are to keep their jobs, then state and local lawmakers will need to reform their pension systems.

The first and most essential reform needed is to shift all new workers to defined contribution retirement plans that require state and local governments to fund 100 percent of benefits in the year they are earned.

Second is dealing with existing defined-benefit systems.

While protecting benefits workers have already earned, state and local officials should enact common-sense pension reforms such as increasing the retirement age (which currently can be even younger than 50), requiring employees to pay a higher portion of their pension contributions, reducing future accrual rates and basing pensions on average earnings instead of employees’ highest three years.

While these reforms will not reduce past unfunded promises, they will improve pension funding going forward, which will help minimize job losses, tax increases and service cuts.

Of course, if the federal government gives serious consideration to bailing out state and local pension plans — as it is doing for private-sector, union-run pension plans — state and local politicians will have no incentive to enact meaningful pension reforms. The State and Local Pensions Accountability and Security Act would nip that sort of nonsense in the bud by barring the federal government from issuing any form of bailout for state and local pensions.