MIAMI — A new ad by Mitt Romney's presidential campaign depicts Barack Obama as the preferred candidate of Hugo Chavez and the niece of Fidel Castro, both figures of scorn in Florida's Hispanic community.

The ad -- apparently a gambit calculated to pry Latino support from the president -- aired Thursday in the all-important swing state of Florida, where Obama and Romney are virtually tied in opinion polls.

In it, a narrator is heard to ask in Spanish: "Who supports Barack Obama?"

It then shows footage of Chavez from about a month ago, in which Venezuela's socialist president said: "If I were American, I'd vote for Obama."

The 30-second spot, entitled "Chavez for Obama," then shows a brief clip in which Mariela Castro, daughter of Cuban President Raul Castro and the niece of revolutionary icon, also gives the Democratic incumbent her endorsement.

"I would vote for President Obama," says Mariela Castro, a sexologist and gay rights activist.

The ad also shows the image of revolutionary fighter Che Guevara, a hero on the communist island but a despised figure for the mostly Republican Cuban expatriate community.

Florida includes many immigrants who fled leftist regimes in Cuba and Venezuela.

The ad debuted with just five days to go until the November 6 presidential vote, which polls have said is too close to call.

A spokesman for the Obama campaign, Dan Restrepo, said the ad "distorts" the record and demonstrates the Republican nominee's "desperation" in the waning days of a hard-fought presidential campaign.