This story was co-published with The New York Times.

In early 2009, as Barack Obama was about to take office, Mitch McConnell, the leader of the Republican minority in the Senate, assembled his caucus at a retreat in West Virginia. There, he laid out his strategy for taking on the new president, who was sweeping into office on a tide of popularity, historical resonance and great expectations barely diminished by the economic free fall then underway.

The key, McConnell told his fellow Republicans, was to stymie and undermine Obama, but to do so in subtle ways. As one of the senators present, Robert F. Bennett of Utah, later recalled to me: “Mitch said, ‘We have a new president with an approval rating in the 70 percent area. We do not take him on frontally. We find issues where we can win, and we begin to take him down, one issue at a time. We create an inventory of losses, so it’s Obama lost on this, Obama lost on that. And we wait for the time where the image has been damaged to the point where we can take him on.’ ”

Seven years later, with the Republicans now in the Senate majority, the opposition led by McConnell is as frontal as can be. After word of Justice Antonin Scalia’s death emerged last weekend, it took the majority leader less than an hour to announce that the Senate would not entertain a replacement before November. “This vacancy should not be filled until we have a new president,” he said.

McConnell’s blunt declaration was taken as the starkest exhibition yet of the obstructionism that has characterized the Kentucky senator’s stance toward President Obama and congressional Democrats. The resistance from McConnell has had an enormous influence on the shape of Obama’s presidency. It has limited the president’s accomplishments and denied him the mantle of the postpartisan unifier he sought back in 2008. But it has also brought the Senate, the institution to which McConnell has devoted his life, close to rupture.

His declaration on the Supreme Court also represents a striking shift for the veteran politician. In throwing down the gauntlet so emphatically, and potentially riling up a Democratic electorate, McConnell was doing something deeply out of character: putting at risk his and his party’s prospects in the coming election.

Anadolu Agency via Getty Images

The best way to understand Addison Mitchell McConnell Jr. has been to recognize that he is not a conservative ideologue, but rather the epitome of the permanent campaign of Washington: What matters most isn’t so much what you do in office, but if you can win again.

As an aspiring young Republican — first, a Senate and Ford administration staff member and then county executive in Louisville — McConnell leaned to the moderate wing of his party on abortion rights, civil rights and many other issues. It was only when he ran for statewide office, for the Senate in 1984, that he began to really tack right. McConnell won by a razor-thin margin in a year when Ronald Reagan handily won Kentucky. The lesson was clear: He needed to move closer to Reagan, which he promptly did upon arriving in Washington.

From that point on, the priority was winning every six years and, once he’d made his way up the ranks of leadership, holding a Republican majority. In 1996, that meant voting for a minimum-wage increase to defuse a potential Democratic talking point in his re-election campaign. In 2006, as George W. Bush wrote in his memoir, it meant asking the president if he could start withdrawing troops from Iraq to improve the Republicans’ chance of keeping the Senate that fall, when McConnell was set to become its leader.

A year later, it meant ducking out of the intense debate on the Senate floor about immigration reform to avoid making himself vulnerable on the issue. It is no accident that the legislative issue McConnell has become most identified with, weakeningcampaign finance regulations, is one that pertains directly to elections.

This is also the best way to understand McConnell’s staunch opposition to the president: It is less about blocking liberal policy goals than about boosting Republican chances. McConnell intuited, shrewdly, that if he could bottle things up in Washington with the filibuster and other tactics, the blame for the gridlock would fall mostly to the Democrats— the party in the White House. Not to mention that Obama had campaigned on the promise of transcending Washington’s divides, which made partisan dysfunction look like a personal failure.

There was an obvious cost to this approach. Withholding any support for President Obama’s agenda meant giving up the chance for more policy concessions on big issues like health care and financial reform. But for McConnell, shaping policy wasn’t the goal. Winning was. When he said, notoriously, just before the 2010 election that “the single most important thing we want to achieve is for President Obama to be a one-term president,” it was less an expression of personal animosity than it was a simple reflection of the permanent campaign ethos.

Another cost to this approach became apparent only later. Withholding any votes from Obama’s big proposals meant, by definition, that the Democrats ended up forcing them through on party line votes, which further inflamed the grass-roots conservative backlash to the president. This backlash helped Republicans win in 2010 and 2014, but it also left McConnell with an empowered right wing, led by the likes of Jim DeMint of South Carolina and Ted Cruz of Texas, that was deeply wary of this onetime moderate with weak ideological moorings. Sometimes, McConnell could use this right wing to his benefit — warning the White House, for instance, that it had better accede to Republican demands on the debt ceiling in 2011 lest the renegades take the country to default.

More often, though, these self-described revolutionaries confounded him, which led to explosions of frustration like the one that a longtime associate witnessed in 2011: “He said, ‘Those idiots, those people come up here and have never been in office and know nothing about being in office.’ ”

Such outbursts were kept under wraps, of course. McConnell needed to appease enough of the chaos makers in order to stay atop the Republican caucus, and to overcome a Tea Party Republican challenger leading up to his 2014 re-election.

He managed to do so, and finally attained his goal of becoming majority leader. He made initial overtures to Obama about finding common ground in areas like trade policy. But soon enough, the focus turned back toward the next election, 2016. Republicans now have seven Senate seats to defend in states that the president carried in 2012.

Justice Scalia’s death has greatly complicated McConnell’s election-year plans. Remarkably, he has, for once, chosen a path that would seem to reduce his party’s odds in November.

Unlike 2009 and 2010, when his opposition took the form of procedural delays, McConnell is taking a high-profile stand. Had he instead allowed the nomination process to proceed and bog down in more gridlock, the outrage quotient among Democrats would have remained lower and his prospects for retaining the majority higher.

The likeliest explanation is that the insurgency that McConnell helped engender has gotten so strong, embodied in the rise of Donald J. Trump and Ted Cruz, that it has caused him to lose his bearings. He felt compelled to get out in front of the base’s ire over the Scalia replacement to avoid a later challenge to his leadership perch.

It is also possible, though, that in the Supreme Court’s balance, in particular in relation to campaign finance law, McConnell has at long last discovered one matter that is so consequential that it is worth risking an election over.

Also on HuffPost:

PHOTO GALLERY Reactions To Scalia's Death