In April 1985, Ortega, the Sandinista leader, visited Moscow to announce an agreement under which the USSR would provide 90 percent of Nicaragua's oil. In June, House Democrats relented on their opposition and helped pass a $27 million humanitarian aid package to the Contra rebels seeking to topple Ortega.
"Many Democrats opposed the Reagan administration's policy of supporting the Contra war," said Cynthia Arnson, who directs the Latin American Program at the Wilson Center and wrote a book on U.S. policy in Central America. "But there weren't many people by the mid-1980s willing to give the Sandinistas the benefit of the doubt in terms of their political and human rights practices."
"By 1985," she added, "there were virtually no supporters in Congress of the Sandinista government, or people who would justify their behavior."
Sanders did not fit that mold. When he returned from his trip, he gave an expansive interview on public access TV in which he praised the Sandinistas, called Ortega an "impressive guy" and said that one reason the Sandinistas were not well thought of in the United States was that the Reagan White House had "trained and well-paid people who are professional manipulators of the media."
"Most of the poor and the working people I talked to felt that the situation now was much better than before," he said. "Rich people, needless to say, who used to have a good life, are not terribly happy."
Sanders did allow that "the Sandinistas make their share of mistakes," but he did not mention human rights, political prisoners or Nicaragua's alliance with the Soviets. Criticized for that in a local TV station editorial, he responded in a letter: "The major point is not whether the government of Nicaragua is a good government or a bad government." The salient question, he said, was whether the U.S. had a right to overthrow it.
In the public access TV interview, Sanders said that if U.S. policymakers "are expecting a tremendous uprising in Nicaragua, they are very, very, very mistaken."
Less than five years later, with their Soviet aid slashed as the Cold War ended, the Sandinistas agreed to their first free election — and were promptly voted out of power.
Honeymoon to Moscow
In spring 1988, just after marrying, Sanders embarked on what he later called "a very strange honeymoon" to the Soviet Union.
David F. Kelley, a Republican lawyer from Vermont, helped arrange the trip. Kelley had spent years visiting the Soviet Union, promoting good will as the Cold War thawed under Soviet leader Mikhail Gorbachev. But Kelley had no illusions about what remained an authoritarian, corrupt system.
"He called me at my office, and he was really excited about these people-to-people exchanges," Kelley said Sanders. "He asked me to help organize a sister city project with Burlington."
After ruling out a Lithuanian city that had been the site of a mass murder of Jews in 1941, Sanders, who is Jewish, settled on Yaroslavl, a Russian city of 600,000 on the Volga River.
The group visited Moscow and Leningrad before heading to Yaroslavl, where Sanders can be seen in video singing "This Land Is Your Land" after a stint in a sauna.
Later, the Americans attended a dinner with local officials. The Yaroslavl mayor stood up and made a conciliatory speech about the mistakes in Russian foreign policy, including the invasion of Afghanistan. Sanders went him one better, Kelley recalls, drawing parallels to Vietnam and denouncing American interventions abroad.
"I got really upset with what I saw to be a comparison between Soviet and American foreign policy because I really didn't think there was any comparison whatever," Kelley said. "After he spoke, I stood up and I said, 'I just want the audience here to know that the mayor isn't speaking for everybody."
An argument ensued and Kelley stormed out, chased by Bernie's wife, Jane, he recalls.
"I would like to think in the 30-some-odd years that Mayor Sanders has matured," Kelly said. "He's genuinely passionately committed to human rights, but he has these blind spots. There's an enormous naiveté."
In a 1989 Harvard Crimson article, Sanders praised glasnost for allowing the Soviet Union to deal "honestly with the nation's sordid history, which had been covered up for decades by official lies," and said it was bringing about a "nonviolent revolution which is forcing citizens of the Soviet Union to rethink, in almost every way, the basic foundations of their nation." He then urged the U.S. to embark on its own version of glasnost.
'I did not see any homeless people'
Sanders also had some kind words for Cuba.
In a letter to a Cuban representative in 1987, Sanders invited a member of the government to speak in Burlington about the "present challenges facing the Cuban government" and Sanders lamented that the Reagan administration "seeks to prop up governments of the rich while attempting to destroy genuine revolutionary movements."
In March 1989, Sanders and his wife traveled to Cuba for an eight-day visit. He had said he wanted to meet with Fidel Castro, but in the end, the highest-ranking official he saw was the mayor of Havana.
"Cuba has solved some very important problems," Sanders told reporters upon his return. "I did not see a hungry child. I did not see any homeless people. Cuba today not only has free health care but very high-quality health care."
According to a report by the nonpartisan Human Rights Watch in January 1990, the Cuban government had cracked down on dissent throughout 1989, after an international human rights delegation had visited in 1988.
Sanders did acknowledge after the trip that "Cuba is not a perfect society. There are political prisoners in Cuba."
Asked on CNN in 2016 about his views on Cuba, Sanders called the regime "authoritarian" but made no apologies for his past remarks about Castro's government.
"When Castro came to power, they did a lot to eliminate illiteracy in that country. So yes, you know, you don't have to praise everything about Fidel Castro," he said. "It's a dictatorship. It's a poor country. But have some good things been done in Cuba? Yes."
Throughout his career, when discussing leftist regimes in Latin America or elsewhere, Sanders has had a tendency to accentuate what he sees as the achievements of those governments, citing their social and health programs and the injustices they inherited from previous right-wing rulers.
Sanders acknowledged Nicaragua and Cuba were not liberal democracies, but "it's not an issue that he dwells on," said William LeoGrande, a professor of government at American University and a specialist on U.S. foreign policy toward Latin America. "He emphasizes the positive things they've done. "
Critics say Sanders has exhibited willful blindness when it comes to foreign policy, focusing only on what fits into his progressive worldview.
But LeoGrande said Sanders has tried to convey context about countries that were portrayed in the U.S. in black-and-white terms, seeking to explain to Americans why leftist movements came to power.
"It's tough for any public figure to really give a nuanced balanced account of these regimes. When they've been cast by an administration as our enemy, the nuance goes out the window," LeoGrande said.
How does Socialism play?
It remains to be seen whether Sanders' foreign policy views will hurt or help him in the primaries, or in the general election if he becomes the Democratic Party's nominee. Some of the people who will vote in 2020 weren't alive for the 2001 congressional authorization of force against al Qaeda, let alone for the long-ago battles over the Sandinistas and the Contras
For most younger voters in the Democratic primaries, references to Nicaragua's Sandinistas or Cuba carry little meaning, said one Democratic policy expert who advises one of Sanders' rivals. "They don't know what a Sandinista is. They just don't care," he said.
In the battleground state of Florida, however, with large Cuban and Venezuela communities, Sanders' stance could become an issue in the general election. Cuba, Nicaragua and Venezuela are still ruled by authoritarian leftist regimes.