When Christmas rolled around without a deal, a wounded Speaker John A. Boehner on the sidelines and the fiscal cliff looming, Sen. Mitch McConnell stepped into the breach of the legislative mess called the fiscal cliff.

It’s not a role the Kentucky Republican and Senate minority leader necessarily wanted to play. He faces a potential primary challenger next year from the party’s right wing, as well as a general election challenge. High-profile roles on messy deals full of compromises aren’t always popular back home nor among conservative tea party supporters.

But McConnell has been the indispensable deal-maker from the wreckage of two years of on-again, off-again “grand bargain” talks, which repeatedly saw House GOP leaders walk away from the table, unable to corral their own members.

“McConnell often does the hard thing that everyone knows needs to get done, but few have either the know-how or muscle to make happen,” said Ryan Loskarn, chief of staff to Sen. Lamar Alexander, R-Tenn.

Just like last year, when McConnell and Senate Majority Leader Harry Reid, D-Nev., cut the deal on the payroll tax, and during the debt-ceiling fight in 2011, when he helped orchestrate the crisis-postponing endgame, McConnell has managed to forge compromises with relatively minimal grumbling from within his own conference.

This time around, McConnell looked at the long game, securing a strategic advantage for the GOP for the president’s entire second term by making the tax cuts permanent for couples earning up to $450,000 a year. He managed to do it while getting the White House to give up its $250,000 level for rate hikes — a level some Republicans feared they would be forced to accept if the nation dived over the cliff.

The after-midnight Senate vote on New Year’s Day wasn’t pretty, but for many Senate Republicans, the prospect of waking up a day later and bearing the blame for tax hikes on everyone would have been far worse.

McConnell’s decision to break off stalled talks with Reid and reach out to Vice President Joseph R. Biden Jr. proved crucial. He tapped into a decades-long relationship with Biden after Reid effectively threw up his hands, unable to counter McConnell’s weekend proposal.

Biden agreed to use up much of the president’s leverage on taxes in return for locking in tax hikes for the rich now.

And McConnell stayed focused on getting a result while many of his colleagues were making speeches or wringing their hands over what wasn’t in the deal. When the president on New Year’s Eve made a blatantly partisan appearance with middle-class Americans, adding a call for even more tax hikes next year, many Republicans bristled with outrage and warned that Obama’s speech threatened to kill the deal. McConnell remained the picture of restraint.

He wasn’t unaware of the political mileage that Democrats could have gotten with an accusation that Republicans were forcing a tax hike on everyone to protect millionaires.

But according to GOP aides, McConnell told his members that if they didn’t cut a deal, the focus of future negotiations would remain on taxes, and they would never get to spending and entitlements.

The strategy became readily apparent in a statement he made Wednesday.

“Now that the House and Senate have acted in a bipartisan way to prevent tax increases on 99 percent of the American people, Democrats now have the opportunity — and the responsibility — to join Republicans in a serious effort to reduce Washington’s out-of-control spending,” McConnell said.

Now that Obama “has the tax rates he wants, his calls for ‘balance’ mean he must join us in our efforts to achieve meaningful spending and government reform.”

With Boehner continuing to face a defiant conference, McConnell may well end up in the same power-broker position a couple of months from now, when Congress and the White House stare down the next cliff of their own making.

That’s something he suggests he’d like to avoid.

In his statement, McConnell pointedly said that Senate Democrats — who have been unable to pass a budget resolution for three years running — must act, “rather than waiting until the last minute, abdicating responsibility and hoping someone else will step in once again to craft a last-minute solution for them.”