Opinion writer

From time to time, the Republican Party goes off the rails. It did so back in the McCarthy period when it either failed to stand up to the demagogic Wisconsin senator or cheered him on in the name of anti- ­communism. It did so just recently when it elevated Hillary Clinton from political opponent to absolute evil, and it is doing so now, attempting to purge the FBI and the Justice Department of officials who, for some reason, are restrained in their enthusiasm for President Trump. These Republicans see plots where others see only common sense and a dedication to duty.

McCarthyism was a cure for which there was no disease. Domestic communism was no threat to America by the time Joseph McCarthy joined the Senate in 1947. To meet the threat, he first had to invent it. He proclaimed the State Department was rife with communists, giving precise numbers — sometimes 205, sometimes 57, sometimes 81. He was promiscuous in his accusations of treason, once blaming the entire Democratic Party. “Twenty years of treason,” he said. Much of the GOP applauded. Much of the Democratic Party cowered.

Things are far different now, of course. Breaking with tradition, Republicans have taken on the FBI, which — especially under longtime director J. Edgar Hoover — gladly served the needs of the GOP. Hoover passed classified information to McCarthy and his counsel, Roy Cohn, who in later years became Trump’s mentor and lawyer and was eventually disbarred before his death in 1986 . Trump says he misses Cohn to this day.

Today’s McCarthy figure is not a mere senator, but the president. Still, the modus operandi is similar. McCarthy railed against communists in government, and Trump and his allies inveigh against something called “the deep state.” As it was in the 1950s, the government has been seized by some force and is the enemy of the people.

What’s more, Trump is, like McCarthy was, a liar. After a while, though, McCarthy, in the view of historian David M. Oshinsky — his “A Conspiracy So Immense: The World of Joe McCarthy” ought to be required reading — came to believe in his cause. An anti- ­communism that started out as political opportunism and a way to discredit Democrats became an obsession. Trump, however, believes in nothing. His intent is to derail the investigation of special counsel Robert S. Mueller III. Trump’s cause is Trump.

Still, what has compelled other members of Trump’s party to jettison years of tradition — fealty to the FBI and respect for state secrets — and back the president? Some of it has to do with political opportunism. The GOP is now the party of Trump. If he goes down, it goes down.

McCarthyism was the product of seismic shifts in world events. In the postwar period, the Soviet Union expanded into Eastern Europe and successfully tested an atomic bomb, while communists also took control in China. Similarly, today’s nuttiness is more than a reflection of mere politics. It is the emotional and knee-jerk conservative reaction to unwelcome change.

During the McCarthy era, the Soviet Union’s colonization of Eastern Europe, its scientific successes and the triumph of the Chinese communists were ascribed to treasonous conspiracies here. There was a smidgen of truth to that. The Soviet atomic program had indeed been aided by American and British traitors, but the Harry S. Truman administration had not “lost” China, as McCarthy and others charged. The Soviet Union was also not as scientifically backward as many Americans thought. It was capable of building an atomic bomb on its own.

Today, conservatives reel from jarring cultural changes such as the widespread acceptance of same-sex marriage and tussles over who gets to use what bathroom. Competition from abroad and the encroachment of automation have cost jobs — while, at the same time, immigrants have become the functional equivalent of communists. To conservatives, the present feels unfamiliar and the future appears frightening. Something has gone wrong. Trump said he would make America great again — “again” being the past posing as the future.

Ultimately, McCarthy overreached when he attacked the Army, accusing it of harboring communists. Trump may have overreached by going after the FBI. McCarthy threatened to attack his fellow GOP senators if they opposed him. Trump intimates as much. Over time, however, McCarthy’s weird behavior put steel in the spine of his colleagues, and they turned against him.

The GOP of today is acting like the GOP of old, and moderate Republicans are once again running scared. History can indeed repeat itself. McCarthy, an alcoholic, wrecked himself, but I wouldn’t count on Trump doing the same. This time around, the voters will have to act. Otherwise, political cowards will carry the day.

Read more from Richard Cohen’s archive.