"I offer now an apology to Nelson Mandela for the way he was received in Miami," Penelas told 10,000 delegates attending the national convention of the National Association for the Advancement of Colored People (search).
"I am proud of how far we have come," Penelas said. "President Mandela's visit was one of the many challenges we have learned from."
In June 1990, Miami's politically powerful Cuban exile community protested a visit by Mandela, newly released from a South African prison, for his praise of Fidel Castro (search), arch-enemy of Cuban exiles but friend of the anti-apartheid movement.
Despite pleas by local African-American leaders, the cities of Miami and Miami Beach, along with Miami-Dade Country, refused to recognize Mandela when he visited the area for a labor conference. The Miami City Commission rescinded a proclamation honoring Mandela.
Tourists angry at the Mandela snub launched a boycott that cost the city $25 million in lost revenue. Business leaders helped end the boycott in 1993, but tensions continued in the 1990s between blacks and Cubans after several incidents between Miami police and immigrant Haitians.
Before his appearance at the convention, Penelas, one of five Florida Democrats running for the U.S. Senate, said there was nothing political about the coming apology, and denied trying to woo black voters.
"Some people want to disagree with me. They have every right to do so, but I'm proud of the fact that this community is changing. It's evolving," he said.
The NAACP convention is being held in southern Florida for the first time since 1980. It goes until Thursday.
One political analyst said the apology would do good, whatever its motivations.
"It may be politically advantageous to apologize, but I think it's a powerful symbolic gesture that will probably help racial tensions," said Dario Moreno of Florida International University (search).
Today, some Cuban leaders who remember that "Mandela moment" stand behind the mayor's apology — even though Mandela, who still holds Castro in high esteem, won't be in Miami to hear it.
"I think history will judge Nelson Mandela as a great man," said Joe Garcia of the Cuban American National Foundation (search). "I don't think history will judge Fidel Castro as a great man."
Some other Cuban exiles questioned the timing of Penelas' apology.
"I can't understand Alex Penelas in this case having taken this position," said Jose Basulto of Brothers to the Rescue (search). "Whether he's sincere or not, well, he's a politician. That's something he has to deal with himself."
For his part, Penelas, who was first elected mayor in 1996, said he always supported an official Miami welcome for Mandela. But some hard-line Cubans have said if the mayor apologizes, he could find himself snubbed by his own community.
Fox News' Orlando Salinas contributed to this report.