BURLINGTON, Vt. — For Daniel Ortega, the president of Nicaragua, the summer of 1985 was to be a moment of extraordinary triumph. In July, on the sixth anniversary of the Sandinista revolution, Mr. Ortega would address a crowd of hundreds of thousands with a message of defiance for his political nemesis, Ronald Reagan, and the Contra militias waging war on him with support from Washington.

Amid the festivities, Mr. Ortega would also meet with the mayor of Burlington, Vt.

Bernie Sanders, then 43, journeyed for 14 hours to reach Nicaragua — switching planes in Boston, Miami and San Salvador — and made a truncated tour of the violence-stricken country before the grand event in Managua.

Aspects of the trip might have unsettled another visitor. A reporter who traveled with Mr. Sanders wrote of strict limits on the taking of photographs. At the anniversary celebration, a wire report described a chant rising up: “Here, there, everywhere, the Yankee will die.”

If Mr. Sanders harbored unease about the Sandinistas, he did not dwell on it.

“After many years of economic and political domination, Nicaragua is determined not to be a banana republic anymore, and it’s free to make its own decisions,” Mr. Sanders declared, according to a Nicaraguan newspaper, El Nuevo Diario, quoting him in Spanish. “Is this a crime ?”