Republican senators were in a bind.

Conservative groups that work to defeat ideologically impure GOP incumbents were demanding a vote against the budget compromise Rep. Paul Ryan, R-Wis., hatched with Democrats. But, with a January deadline looming, voting down the compromise was essentially voting for another government shutdown. How, then, to justify voting no?

They couldn’t credibly say the deal had too much spending: It cut the deficit and didn’t raise taxes. And they couldn’t say it hurt the military: It added $22 billion to the Pentagon budget for 2014.

Instead, they singled out a small provision — a $6 billion cut to military pensions over 10 years — and proclaimed it an all-out assault on our brave men and women in uniform.

“It is absolutely wrong to take from our military retirees, those who have sacrificed the most,” Sen. Kelly Ayotte of New Hampshire said with indignation at a Tuesday news conference she organized with veterans groups.

Sen. Roger Wicker of Mississippi was equally aghast that the Ryan plan would “penalize and treat differently the brave men and women who ... chose a military career.”

And Sen. Lindsey Graham of South Carolina, who is fighting off a primary challenge, was coarse: “Of all the people we could’ve picked on to screw, how could we have arrived here?”

Their outrage was suspicious. The cut they condemned is a one-percentage-point reduction in cost-of-living increases for military pensions for those who retire young, often in their 40s and usually to begin second careers. And the need to restrain military benefits is undisputed: Overall payments to military retirees and survivors were $52 billion last year, and personnel costs, now half of the Pentagon’s budget, will soon crowd out everything else if current trends persist.

But the gambit gave Republicans an excuse to oppose Ryan’s compromise. In a key vote Tuesday, 33 of 45 Senate Republicans ­— 73 percent — voted to block a final vote. That wasn’t enough to kill the agreement, but it was a complete flip from what happened five days earlier in the House, where 73 percent of Republicans voted in favor of the deal.

In part the difference was because Ryan has less sway over Senate Republicans and because of partisan bitterness over the recent filibuster skirmish. But a bigger factor may have been the extra time conservative groups had to rally opposition, and lawmakers had to devise a cover story for their nays.

Whatever the cause, last week’s House vote already looks more like a bipartisan blip than the beginning of a new era of cooperation. On Tuesday, most Senate Republicans returned to the reflexive opposition that has characterized the past five years.

Among the 33 Republicans voting against the compromise were the party’s leaders (Mitch McConnell of Kentucky and John Cornyn of Texas, who both face conservative primary challenges) and aspiring candidates for the presidential nomination (Marco Rubio of Florida, Rand Paul of Kentucky and Ted Cruz of Texas).

Fortunately there were a dozen grown-ups on the Republican side Tuesday (more than enough to ensure passage), including elder statesman Orrin Hatch (Utah), budget geek Rob Portman (Ohio) and the iconoclastic John McCain (Arizona).

After casting his vote to advance the budget deal, McCain had a heated exchange on the floor with Ayotte and Wicker, who just minutes earlier had stood before the TV cameras calling the Ryan bill an attack on those in uniform.

Ayotte alleged that a sergeant first class retiring at age 40 with 20 years of service would lose nearly $72,000. She also claimed, even though the cuts are for regular pensions, that those on disability pensions would be hurt by the deal. Graham, in his turn at the microphones, predicted that outrage would have been greater if the agreement cut cost-of-living increases for Social Security retirees.

But military pensioners — about 17 percent of personnel serve long enough to qualify — also get Social Security benefits. And though they deservedly receive better benefits than civilians, the generous payouts are causing budgetary havoc for the armed forces. The $6 billion cut over 10 years barely begins to address the problem, yet it was the justification used more than any other by the 33 Senate Republicans who with their votes Tuesday were willing to risk another government shutdown.

“This budget’s probably going to pass,” Graham lamented, “because everybody’s hell-bent to get out of town and not shut down the government. ... We’re in a big hurry around here to show you how functional we are.”

And that’s such a bad thing?