(CNN) Bernie Sanders has come under attack from Democrats and Republicans this past week over his praise for social programs implemented by the late Cuban dictator Fidel Castro , a sign of the increasing scrutiny the Vermont senator faces as he has ascended to become the front-runner for the Democratic presidential nomination.

Over parts of five decades, Sanders more than any other national political figure has engaged and, at times, defended the Cuban government, Daniel Ortega's Nicaragua and other controversial leaders across Latin America and Russia -- a stark break from the foreign policy consensus that dominated American political circles since the end of World War II.

Now, as Sanders' stature rises, those past comments are being weaponized by opponents like former New York Mayor Michael Bloomberg and others, who both disagree with his analysis and argue that it will be damaging -- if not disqualifying -- in a general election campaign. Sanders has sought to blunt the criticism by arguing that his assessment of socialist governments in countries like Nicaragua has been stripped of context and often leaves out his condemnations of human rights violations committed by those regimes.

The current furor was kicked off by Sanders' comments on 60 Minutes , the CBS News program, when he was asked about his positive reflections on Castro's Cuba.

"We're very opposed to the authoritarian nature of Cuba but you know, it's unfair to simply say everything is bad," Sanders said. "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?"

Pressed on the Castro regime's jailing of dissidents, Sanders argued that it should be possible to separate out the good from the bad.

"That's right. And we condemn that," he said of Castro's authoritarianism. "Unlike Donald Trump, let's be clear, I do not think that Kim Jong Un is a good friend. I don't trade love letters with a murdering dictator. Vladimir Putin, not a great friend of mine."

Eyes on Cuba and Nicaragua

Sanders has for decades singled out the broadly positive achievements of autocratic regimes -- like health care and education programs in Cuba and Nicaragua -- while mixing in criticism of their governments' anti-democratic behavior. His views have also been fueled by a fundamental rejection of American efforts to boost right-wing governments across Central and South America.

In an interview from the 1980s, Sanders argued that the longevity of the Castro regime was not solely due to its repressive tactics, but a genuine base of support in Cuba.

"You may recall way back in, when was it,1961 they invaded Cuba and the, everybody was totally convinced the Castro was the worst guy in the world. All the Cuban people were going to rise up in rebellion against Fidel Castro," Sanders said, discussing the logic behind the Kennedy administration's failed Bay of Pigs coup. "They had forgotten that he educated the kids, gave them health care, totally transformed the society."

Then, as now, Sanders added a caveat to his statement.

"You know, not to say that Fidel Castro or Cuba are perfect, they are certainly not," he said. "But just because Ronald Reagan dislikes these people does not mean to say that the people in their own nations feel the same way."

In a 1989 interview with the Rutland Herald , a locally owned Vermont newspaper, Sanders discussed a recent trip to Cuba, where he had hoped to meet with government officials, from local mayors to Castro himself.

When Sanders returned, he discussed the visit, which included a sitdown with the mayor of Havana, saying, "The revolution (in Cuba) is far deeper and more profound than I had understood it to be" and encompassed more than economic policy. "It is a revolution of values in which people, instead of working for their own personal wealth, work for the common good."

A couple years earlier, in an interview with another Vermont news outlet, The Gadfly, Sanders recalled his disgust as a younger man at the way President John F. Kennedy described the Cuban revolution and how that rhetoric shaped his skepticism of American liberals.

"President Kennedy was elected while I was at the University of Chicago, that was 1960. I remember being physically nauseated by his speech and that doesn't happen often. He debated Nixon on Cuba. And their hatred for the Cuban Revolution, both of them, was so strong," Sanders said. "Kennedy was young and appealing and ostensibly liberal, but I think at that point, seeing through Kennedy, and what liberalism was, was probably a significant step for me to understand that conventional politics or liberalism was not what was relevant."

At around the same time, in 1987, Sanders as the mayor of Burlington, Vermont, sent a letter to a Cuban representative in Washington, DC, Ramón Sánchez-Parodi, talking up his relationship with the Nicaraguan government and inviting Sánchez-Parodi to visit the city.

"I am afraid that the people of Burlington, and Vermont, are as ignorant about what is happening in Cuba as most Americans," Sanders wrote to Sánchez-Parodi, before offering him an audience. "I personally would be more than happy to welcome you to the City and to sponsor your talk."

Ana Maria Archila, the co-executive director of the Center for Popular Democracy, which endorsed Sanders in the 2020 primary, said the Vermont senator should seek to broaden the discussion over Cuba and make it clear that he believes anti-democratic laws and customs perpetrated by the Castros are "unforgivable."

But Archila, who was born in Colombia, defended the core of Sanders' remarks -- and attributed the stepped-up criticism to the heat of a political campaign after Sanders emerged from a decisive win in Nevada.

"I grew up in Colombia. Colombia was the one country that was always dominated by the right, but even in Colombia people talked about the Cuban health care system and the Cuban educational system as the models to try to emulate, because it was seen as one of the most unique success stories of a government actually succeeding in creating a public education and public health care infrastructure that was enviable," Archila said.

Sanders' efforts to toe the line of praising progressive populist reforms without fully backing oppressive regimes was a theme of his political activity in the 1980s.

During that decade, Sanders also spoke out in support of the Nicaraguan government under leftist Sandinista leader Daniel Ortega. The Sandinistas overthrew a US-backed Nicaraguan regime in 1979. They secured their power in subsequent elections. But when the opposition Contras launched a civil war, attempting to remove the Sandinistas, the Reagan administration secretly funneled money -- as part of what is known as the Iran-Contra scandal -- to the Contras.

Ortega, the Sandinista leader, was voted out of office in 1990, but re-elected in 2006, and was inaugurated on the same day as former Venezuelan leader Hugo Chavez. According to a report in The Guardian in 2007, Chavez flew to the Nicaraguan capital of Managua hours after his own ceremony to stand in support of Ortega's return to power. Fidel Castro, who was too ill to attend, sent his congratulations

Sanders in the 1980s said Ortega had the right, as the leader of his country, to meet with the Soviets and offered a review of the Nicaraguan government under Ortega that echoed his comments on Castro's Cuba.

"Is it a totalitarian country? No, it is not a totalitarian country. Are there civil liberties. Yeah, there are civil liberties. Is it a perfectly free country? No, it most certainly is not. Is it freer than of the most of the countries in Central America? Yeah, it is," Sanders said. "Within the context of the misery and the lack of democracy in Central America, it holds up reasonably well. Is the Nicaraguan government always right? The answer is absolutely not. Have they made mistakes? Sure they have."

A visit to the Soviet Union

Sanders has also come under increasing scrutiny in recent days over his 1988 trip, with wife Jane, to the Soviet Union. Upon returning he praised the public transit system in Moscow as "the cleanest, most effective mass transit system that I've ever seen in my life" and described a transparency from Russian leaders he did not expect.

"What surprised me about the trip to the Soviet Union was the strong degree of friendship and openness that both Soviet officials and ordinary officials have to us both is Yaroslavl and the other cities," Sanders said. "Both the officials and the people were extremely generous and warm and I was very surprised by the degree in fact they like Americans and admire Americans."

He attributed the ostensibly open conversation to his own willingness to speak directly about issues facing his own country, with specific mentions of the expensive housing and the outsized cost of medical care in the US.

"The other observation that I would make is that I was surprised to the degree of self-criticism, which Soviet officials were prepared to make about their own society," Sanders said of the notoriously closed and violent Soviet government. "Frankly, I thought they would be there to tell us that everything is wonderful and that certainly was not the case. For example, they are absolutely open in acknowledging that they are not a democratic society."

In a statement to CNN, the Sanders campaign defended his travels and described them as an effort to turn down Cold War era heat among American citizens.

"As Bernie repeatedly made clear, he believed then and believes now that issues of war and peace are local issues because they direct government investment away from working people here at home," Sanders communications director Mike Casca said. "That's why as mayor of Burlington he focused on Reagan's dirty wars and doing everything he could do to prevent international nuclear conflict."

In an essay published the next year, titled "Reflections from Vermont," Sanders expressed frustration with how his views, as a democratic socialist, had been conflated with support for Soviet communism, a situation he attributed to the "tremendous political ignorance in this country created by the schools and the media."

"On more than one occasion I have been told to 'go back to Russia,'" Sanders wrote. "But, if we maintain a strong position on civil liberties, express our continued opposition to authoritarianism and the concept of the one-party state, I am confident that the vast majority of the people will understand that there is nothing incompatible between socialism and democracy."

In the years after the fall of the Soviet regime, as Russia fell into a steep decline under its successor government, Sanders argued that Russian President Boris Yeltsin needed some kind of "support and aid" from the US, though he couldn't be sure "how much."

The downside of inaction, Sanders said, would be a panicked population's grasping back for the old government and lashing out at Yeltsin.

"The worst thing I think that could happen there is if there was a restoration of an authoritarian, communist-type government," he said. "That would be very bad."