Want smart analysis of the most important news in your inbox every weekday, along with other global reads, interesting ideas and opinions? Sign up for the Today’s WorldView newsletter.

It was bound to happen. After surging ahead as the Democratic presidential front-runner, Sen. Bernie Sanders (I-Vt.) faced a wave of attacks during Tuesday night’s debate in South Carolina. The democratic socialist’s rivals took turns hitting Sanders on the costs of his health-care plans, the supposed threat he poses to Democrats in down-ballot races, and his questionable record on gun control.

Then there was his leftist past. A recent segment on CBS News’s “60 Minutes” brought to the fore the Washington establishment’s long-standing concerns over Sanders’s Cold War-era record of celebrating Marxist guerrillas and acting as an apologist for Soviet-aligned regimes.

On the CBS show, Sanders was asked to account for decades-old praise for Cuban dictator Fidel Castro. “We are very opposed to the authoritarian nature of Cuba,” Sanders replied. “But, you know, it’s unfair to simply say, ‘Everything is bad.’ When Fidel Castro came into office, you know what he did? He had a massive literacy program. Is that a bad thing, even though Fidel Castro did it?”

Some of Sanders’s Democratic opponents seized on admissions like this to cast him as an anachronistic ideologue unsuited for the political moment. His opponents on the right caricature his sympathies as evidence that his campaign’s populist platform — which embraces the precedents set by successful social-democratic systems in Northern Europe — is a stalking horse for a more sinister, freedom-crushing agenda. His defenders, meanwhile, cited other examples of mainstream politicians, including President Barack Obama, venturing similarly nuanced arguments about the Cuban regime.

Is Sanders soft on left-wing authoritarians? “Such is the power of Cold War framing — and such is the power of Soviet propaganda — that the decoupling of totalitarianism from socialism has not happened in American political culture,” wrote the New Yorker’s Masha Gessen. “The right and the left both essentially continue to believe that the Soviet Union and its satellite, Castro’s Cuba, were socialist states. On the right, this has meant equating the ideas with the totalitarian nightmare. On the left, it has led to erasing or minimizing the nightmare.”

Sanders, argued Gessen, is “guilty of minimizing” the horrors of Communist rule, a possible consequence of the timing of his 10-day 1988 visit to a Soviet Union in the grips of perestroika, where he encountered a society in “a moment of unprecedented openness and self-criticism.” The Sanders campaign, though, contends that the rhetoric of the-then obscure mayor of Burlington, Vt., reflected a frustration with the costs and consequences of Reagan-era “dirty wars” in Latin America and beyond.

“He was trying to show that we weren’t all Ronald Reagan,” Lauren-Glenn Davitian, a founder of CCTV, Burlington’s public access television, told my colleague Griff Witte. “He was curious. And he was mad about how these stories were being told. He wanted to see for himself what was really happening.”

In an Atlantic essay on Sanders’s foreign policy vision, Uri Friedman cited a remark Sanders made in the 1980s when answering a concerned constituent about his apparent support for the left-wing Sandinistas in Nicaragua. It didn’t matter whether the Nicaraguan government was “good or bad,” Sanders replied, but whether “the United States has the unilateral right to go to war and destroy a government that President Reagan and members of Congress dislike.”

That sentiment lingers in some of his policy positions now. “He’s so scarred by U.S. aggression in Latin America that he now opposes the Trump administration’s decision to withdraw its recognition of authoritarian President Nicolás Maduro as Venezuela’s legitimate leader, even though the move hasn’t involved military force,” noted Friedman.

Sanders’s supporters point to an enormous double standard in the criticism that comes his way. On Wednesday, American news outlets published stories about the death of Egyptian dictator Hosni Mubarak, who was boosted for years by U.S. political and military support. Matt Duss, Sanders’s foreign policy adviser, tweeted a Mubarak obituary with a barbed comment: “As the DC establishment gins up outrage over some complimentary words about Cuban literacy programs, a timely reminder that they backed this dictator for decades, and continue to back his even worse successor.”

Democrats to the right of Sanders lament his attacks on America’s political legacy, likening it to President Trump’s own skepticism about America’s past misdeeds. They point, also, to intelligence reports that the Kremlin wants to tip the scales in favor of Sanders, as it did with Trump.

But Sanders has waved away any link with Russian President Vladimir Putin and has repeatedly spoken against Putin’s brand of illiberal nationalism mixed with corrupt cronyism. More vociferously than most of the Democratic field, Sanders has championed a kind of internationalism rooted in democratic, egalitarian values. And he has cast Trump’s demagogic style and right-wing nationalism as part of a broader authoritarian turn in global politics that he wants to counteract.

“Sanders is shifting away from the antiquated paradigm of ‘foreign policy’ — with its clear demarcations of home and abroad and its appeals to a unified national interest — and towards ‘foreign politics,’” wrote Ben Judah and David Adler in the Guardian. “He is targeting the global architecture of kleptocracy in which many U.S. firms and passport holders are complicit, and building ties with social movements around the world that can serve as allies in the fight against state corruption.”

Set that against a U.S. president whom critics accuse of turning authoritarian at home while coddling autocrats abroad. “Throughout his career, Sanders has repeatedly excoriated American foreign policy, refusing to accede to the myth of America’s fundamental innocence,” wrote New York Times columnist Michelle Goldberg. “But in a race with Trump, he would represent American exceptionalism.”