There was a time when the left considered McCarthyism the worst of all political tactics. That was before it became useful to question Mitch McConnell’s loyalty to his country.

The Senate majority leader’s offense is blocking Democratic-sponsored election-security bills, which has occasioned the sort of charges that Dems have spent the last 50 years ruling out of bounds.

The Washington Post headlined a column, “Mitch McConnell Is a Russian Asset.” It wasn’t tongue-in-cheek. Urged columnist Dana Milbank: “Let’s call this what it is: unpatriotic. The Kentucky Republican is, arguably more than any other American, doing Russian President Vladimir Putin’s bidding.”

Rep. John Sarbanes (D-Md.) said supporting these bills was a chance for McConnell “to do the right thing in terms of demonstrating his patriotism.” A CNN national security analyst declared: “The only reason Mitch McConnell is doing this is that he believes Donald Trump cannot win without the Russians’ help.” MSNBC host Joe Scarborough dubbed McConnell “Moscow Mitch.”

The occasion for the assault on McConnell was a naked and cynical political setup. After Robert Mueller’s testimony, when Democrats pretended to learn that Russia still presents a threat to our democracy, Democrats tried to get so-called unanimous consent for election-security bills in the Senate.

This procedure is reserved for uncontroversial items that, as you might guess, have unanimous support. While everyone in the Senate agrees we should combat Russian interference, not everyone agrees on how to do it.

One of the Democratic bills would mandate the use of paper ballots as a fail-safe against hacking. This may well be the best practice going forward, but running elections is the responsibility of states and localities, not the federal government. As supporters of traditional state prerogatives, Republicans could be expected to oppose the bill, and sure enough, it only got one Republican vote when it passed the House.

Insisting the GOP-held Senate unanimously pass Dem legislation is manifestly absurd.

Another bill would require campaigns to report offers of foreign assistance, a superficially appealing idea. Yet writing it into legislation is easier said than done. The more comprehensive such a bill is, the more likely it is to sweep up minor and innocent interactions that fall far short of the infamous Trump Tower meeting (that itself, it’s worth remembering, came to nothing.)

There is no need to reach for extravagant explanations for why McConnell would oppose these bills (he’s a tool of the Kremlin! he hopes his Moscow minders will put Trump over the top in 2020!).

McConnell has an extensive record as an opponent of federal activism and poorly drafted campaign-reform bills with unintended consequences.

What the case against McConnell comes down to is the usual sophomoric Washington argument that if you don’t want do this one specific thing, you don’t want to do anything and have the worst possible intentions.

McConnell supported the $380 million in election-security funding that passed Congress. And he backed the bipartisan Senate Intelligence Committee investigation into election interference that produced an alarming public report last week about the scope of attempted Russian hacking.

McConnell’s critics rely heavily on the presumption that if the Democratic bills don’t pass the Senate, nothing will be done to combat Russian or other foreign interference. This, too, is false. DHS and other Trump administration agencies have gotten high marks for what they have done to bolster our defenses, including in the bipartisan Senate report.

Russian interference is a legitimate issue and a legitimate cause of outrage. The left’s emotional investment in it, though, is clearly as much anti-Trump as it is anti-Putin. There is a good chance that the party’s newfound hawkishness on Russia washes out as soon as Trump ­departs the national stage.

The one man we can expect to be consistent on the question is, as it happens, Mitch McConnell. As he pointed out in a peppery defense of his record on the Senate floor, he has been a Russia hawk going back to the Reagan administration. When Democratic Presidents Bill Clinton and Barack Obama cozied up to the Kremlin, McConnell urged caution. He has continued to call out Putin since 2016.

He doesn’t need lessons from anyone about how to be clear-eyed about Russia — or how to be patriotic.

Twitter: @RichLowry