Rep. Paul Ryan’s bid to kick off an overhaul of military compensation is backfiring — instead highlighting the perils of scaling back entitlement programs.

The Senate on Wednesday handily approved, 95-3, a House-passed bill that the House Budget Committee chairman says “undermines” a tenet of the bipartisan budget deal he struck in December with his Democratic counterpart in the Senate, Patty Murray of Washington state.

The bill would roll back the budget deal’s military pension cuts, which Ryan pushed to include in the agreement and then defended even as many of his fellow conservatives jumped ship amid a backlash from powerful advocacy groups for service members and veterans.

The Wisconsin Republican’s gambit was viewed as an attempt to get the ball rolling on military compensation reform — something top commanders say is badly needed — and to show that entitlement cuts are possible, that nothing is sacred.

So far, it’s had the opposite effect, unleashing a massive lobbying campaign and forcing vulnerable incumbents to explain to constituents why they voted to cut benefits for those who’ve sacrificed for their country.

Congress has now overturned the short-lived pension cuts, providing political cover for members in both parties up for reelection this fall but undoing a rare victory for those seeking to scale back entitlements.

On Tuesday, Ryan blasted the House bill as taking “a step back” after he cast one of just 90 votes against it. “Compensation costs are hollowing out the Pentagon’s budget,” he said in a statement. “They are taking resources away from training and modernization — and putting our troops at risk.”

Across the Capitol, senators had been considering their own bill to roll back the pension cuts, with Murray and other Democrats who ushered the budget agreement through Congress in December saying they were open to changing a core part of their pact.

But, reversing himself on how to pay for the restored pension cuts, Senate Majority Leader Harry Reid (D-Nev.) decided to proceed with the House-passed measure, which would offset its cost by extending for a year the impact of sequestration on mandatory Medicare spending. Republicans and Democrats in the upper chamber were united in their desire to overturn the cuts but divided on how to pay for the projected $7 billion in savings over the next decade.

The measure passed in the Senate on Wednesday would leave the pension cuts in place for service members who joined on or after Jan. 1, essentially grandfathering most current service members and all veterans.

The debate over the proposal that unfolded through the week highlighted just how political the issue has become.

“You’re for vets, or you’re against vets,” declared Sen. Mark Begich of Alaska, one of four Democrats who put forward the Senate bill. He’s facing the prospect of a tough reelection battle this fall, just like the other three bill sponsors: Mark Pryor of Arkansas, Jeanne Shaheen of New Hampshire and Kay Hagan of North Carolina.

The decision to bring their measure to the floor — of the more than a dozen bills to undo the cuts — was designed to provide them political cover back home. Pryor, for instance, is already battling TV ads on the pension issue.

The conservative Concerned Veterans for America has run spots in support of Republican Rep. Tom Cotton, who’s challenging Pryor for his Arkansas Senate seat. And the group’s CEO, Pete Hegseth, vowed in an interview to continue holding “people accountable” who voted for the pension cuts.

Under December’s budget deal, working-age military retirees — some of whom retire with pensions in their 40s after 20 years of service — would see those pensions grow at a slower pace. Their annual cost-of-living adjustments would be pegged to the rate of inflation minus 1 percentage point. But once they turned 62, they’d go back to receiving cost-of-living adjustments pegged to the full rate of inflation.

The provision wouldn’t kick in until late next year, a delay Ryan says was designed to allow the House and Senate Armed Services Committees to consider alternative proposals for reining in the military’s personnel costs. In other words, it was meant to force the committees to confront the toxic issue after years of dragging their feet.

But the backlash could make it even more difficult to deal with growing personnel costs, which Defense Secretary Chuck Hagel has said threaten to crowd out spending on other priorities.

Pentagon officials had declined to offer full-throated support for the pension proposal in the budget deal, urging Congress to grandfather current service members and veterans so that only future recruits would be affected. The bill approved Wednesday does just that.

From an economic and national security perspective, “it makes sense” to cut benefits for service members, said Lawrence Korb, a senior fellow at the liberal Center for American Progress. From a political perspective, “it doesn’t.”

“Other than Paul Ryan, nobody has stepped up to make that case,” he said.

The charged issue sparked strong emotional reactions on both sides, with advocacy groups for service members accusing lawmakers of breaking faith with those in uniform. Leading the charge is the Military Officers Association of America, the nation’s largest association of military officers.

“This is a big deal financially, and it’s an even bigger deal because they’re not keeping their promises to these men and women,” the group’s president, retired Vice Adm. Norb Ryan, said last month in a debate with Korb on the PBS NewsHour.

The nonpartisan Congressional Budget Office attempted to mediate the issue in 2012, explaining in a report that the military’s personnel and health care costs have “increased consistently” over the past decade, even when adjusted for inflation. But, the report said, much of the trend was the result of new benefits put in place by Congress — and pay raises for service members that in some years exceeded the growth in private-sector wages.

To adhere to the sequester budget caps, the report said, “Significant changes will be needed in military compensation, procurement of weapon systems, or both.”

So far, Congress has resisted efforts to cut from either side of the equation, overturning Pentagon proposals to reduce health care costs and scrap weapons programs it says it no longer needs.

In the House, Armed Services Chairman Buck McKeon (R-Calif.) suggested in an interview that had the pension cuts issue moved slower, more deliberately and been better explained, it might not have set off such a firestorm, particularly among veterans groups.

“All they saw was, ‘Hey we’re getting our benefits cut, we’ve got to fight for our benefits,’ and so there was a lot of political action,” he said. “It generated a lot of support here because people support the veterans.”

In 2012, the House and Senate Armed Services Committees did set up a commission to study the issue and report back. But the commission’s findings aren’t due until early next year — meaning any recommendations accepted by Congress probably wouldn’t take effect until 2016 at the earliest.

“It’s frustrating that we are not accepting the reality of where we’re at,” said Rep. Adam Smith of Washington, the top Democrat on the House Armed Services Committee. On Tuesday, the Washington state congressman had joined Ryan in voting against the House bill to restore the pension cuts, calling the measure “unacceptable.”

“Congress keeps refusing to make difficult choices demanded of us,” he said.