HARRISBURG — The Republican-controlled legislature is racing to send Gov. Wolf a long-sought bill by week's end that would overhaul retirement benefits in Pennsylvania's two debt-riddled public pension plans.

The Senate approved the bill Monday in a 40-9 vote, and the House is expected to vote by Thursday on the measure, which seeks to shift some, if not all, benefits for future state and public schools employees into 401(k)-style plans. The goal is to create pension plans that cost less state money and do not hold taxpayers entirely liable for backing them, regardless of how the markets perform.

A spokesman for House GOP legislative leaders said there are enough votes in the chamber to pass it. Wolf, a Democrat, has said he supports the legislation.

On the surface, it looks like a deal, but no one is calling it done.  Less than two years ago, a pension-reform effort imploded at the eleventh hour, prolonging the budget impasse in Wolf's first year in office.

Still, Republicans leaders were cautiously optimistic Monday, with Senate President Pro Tempore Joe Scarnati (R., Jefferson) calling the measure "historic."

The bill would affect only future state and public school employees who receive benefits through the state's two big pension funds. Together, the two funds hold a crushing $62 billion debt.

Under the proposal, new employees, starting in 2019, would be given two options. They could move into a hybrid plan that steers part of their pay into a 401(k)-style plan, but the rest of their pay would receive the current — and more generous — pension benefit (based on years of service and the highest three years of pay). Or they could switch entirely into a 401(k)-style plan.

Current employees could opt in, but would not be forced to participate in the new plans. Legislators have determined that doing so would lead to years of litigation.

Current legislators, too, would not be forced to switch — a controversial provision. Though there has been public support for including lawmakers in any reform proposal, they have been averse to cutting their own benefits.

State troopers and corrections officers hired in the future would be exempt from the changes, and current retirees would not lose benefits.

Reining in the skyrocketing cost of public employee pensions has been a legislative priority for many years, but has been bogged down by disagreement over the best way to fix the problem.

Former Gov. Tom Corbett, a Republican, once called pensions the "Pac-Man" of the state budget, eating up more and more dollars every year that could have gone to other programs.

Still, there has been criticism from some experts that the plan making its way through the legislature would not make a dent in reducing the current debt facing the two pension systems.

The legislature in 2010 enacted a law that among other changes committed the state to start paying down the pension debt. But it gave the state some financial breathing room by placing limits on what it was expected to pay in the first few years.

Critics say that the only surefire way to address the state's pension problem is to pay down the debt with equal-dollar contributions annually over 15 or 20 years, with no opt-outs. The current pension reform proposal does not do that, they say.