Florida Democratic House candidate Donna Shalala is taking heat after a congresswoman who praised the late Cuban dictator Fidel Castro was seemingly invited to campaign with her.

Shalala is the Democratic nominee for Congress in Florida’s 27th district – an area that is largely made up of Hispanic residents, particularly of Cuban descent. Despite her name recognition, Shalala has faced a tight race in a district that Hillary Clinton won by a 20-point margin over President Trump in 2016.

And her campaign’s planned event with Rep. Barbara Lee, who called Castro a “smart man” and encouraged people to “mourn his loss” after his death, isn’t helping.

About 40 people protested outside Shalala’s event in Coral Gables with House Minority Leader Nancy Pelosi Wednesday, the Miami Herald reported.

Frank de Varona, a demonstrator, told the Herald he was “angry” and “furious” after he learned about the event with Lee in an email. He was part of the controversial Bay of Pigs invasion of Cuba and had been sentenced to 30 years in prison, according to the Herald. He was released after the U.S. government paid for his – and more than 1,000 other men’s – release.

Shalala’s campaign ultimately amended the event on its website to just include Pelosi. Lee stayed in Georgia, Pelosi said.

FOX NEWS MIDTERM ELECTIONS HEADQUARTERS

“I disagree with anyone that praises Castro or praises [Nicaraguan leader Daniel] Ortega … or praises any other dictator,” Shalala told the Herald. “We should be bringing strong sanctions against them. Let me make it clear: Not every member of Congress that comes down here do we agree on every issue, but particularly on the Cuban issue or the Nicaraguan issue or the Venezuelan issue.”

Maria Elvira Salazar, the Republican congressional nominee, said it is “shameful” for any candidate in the district to “bring a supporter of the Castro regime to campaign.”

“This is not only disrespectful for the Cuban exile, but also for the millions of Venezuelans and Nicaraguans, many who live in this district, who are suffering as a result of the Castro regime,” Salazar, a Spanish-language journalist, said in a statement.

It’s unclear how Lee’s invitation was extended – or taken back. Democratic and campaign insiders pointed to Pelosi as the one who asked Lee to come to the 27th district – even though Shalala’s staff had objections, Politico reported.

“Pelosi is the future House speaker. She’s the most powerful Democrat in the chamber,” an unnamed Shalala campaign staffer told Politico. “We couldn’t offend her and tell her she couldn’t bring her friend. We were stuck.”

After Castro’s death, Lee said, “He led a revolution in Cuba that led social improvements for his people.” She also said his death was “very sad for the Cuban people.”

MIAMI HOUSE RACE ONCE SEEN AS EASY DEM PICKUP TIGHTENS

Shalala, a former Health and Human Services Secretary under the Clinton administration and president of the University of Miami, has struggled in her race to take over the seat held by retiring Rep. Ileana Ros-Lehtinen, a Republican. The district includes Miami Beach, Coral Gables, Key Biscayne and Little Havana.

Fox News has ranked the race a toss-up.

Salazar, too, has been criticized regarding Castro. Both her primary opponents and Shalala have accused her of being too soft on the late dictator when she interviewed him in 1995.

“I have an opponent that treated Castro with enormous respect, bowed to him and called him ‘el comandante,’” Shalala said, according to the Miami Herald. “I would never do that, nor would I stand next to any of them at any time.”

Neither a representative for Lee nor Shalala returned requests for comment from Fox News Thursday.

Fox News’ Allie Raffa contributed to this report.