His trysts with tyrants didn’t end in Cuba and Nicaragua.

Bill de Blasio was also among the legislators who honored reviled Zimbabwe despot Robert Mugabe at City Hall in 2002 — an event organized by Councilman Charles Barron.

De Blasio was in his first term on the City Council, while Mugabe was already notorious for starving his people, jailing or torturing his political rivals, seizing land from white farm owners and promoting anti-gay policies.

Thirty-six of the 51 council members shunned the event, which included an hourlong lecture by the dictator in the council chambers, followed by a reception.

Politicians on Tuesday said the gathering was inexplicable.

“Mugabe was thought of as a vicious despot who had no place being in New York’s City Hall,” said Queens Councilman Peter Vallone Jr., who boycotted.

“Mugabe killed his opponents. He took away land from anyone who wasn’t black. He rigged elections. And Charles Barron welcomes him with open arms!”

Brooklyn state Sen. Simcha Felder, then a first-year councilman, recalled being shocked by Mugabe’s visit.

“I asked around and found out what a madman Mugabe was,” Felder said, explaining why he stayed far away.

But de Blasio was there, along with other legislators, mostly from the council’s Black, Hispanic and Asian Caucus, who still considered Mugabe a hero for helping overthrow white colonial rule decades earlier.

The Democratic mayoral nominee finally had a change of heart six years later, when runoff elections in Mugabe’s Zimbabwe were marred by violence.

De Blasio — by that time mulling a run for either Brooklyn borough president or public advocate — conceded that honoring Mugabe was “a mistake,” and in retrospect, “I feel ashamed of it.”

De Blasio also admitted that, “even based on the information we had six years ago, there was sufficient information to not have [Mugabe] in our chambers.”

He declined to comment further Tuesday.

Meanwhile, his GOP rival, Joe Lhota, continued pounding de Blasio for his visits to Cuba and Nicaragua, where he was allied with the Marxist Sandinistas.

“Bill de Blasio needs to explain himself — and explain himself now — to the hundreds of thousands of New Yorkers who escaped Marxist tyranny in Asia, Central America, and from behind the Iron Curtain in Eastern Europe,” Lhota said in Flushing.

“De Blasio’s class-warfare strategy in New York City is directly out of the Marxist playbook. Now we know why.”

De Blasio dismissed Lhota’s attack as coming from a right-wing playbook.

“It’s 2013. I’d like to note, I’m not going to stoop to Joe Lhota’s level here,” de Blasio said.