The pair teamed up to encourage Latinos in Florida to vote for Joe Biden.

On Monday, former President Barack Obama and "Despacito" singer Luis Fonsi held a rally in South Florida encourage Latinos in the battleground state to vote for former Vice President Joe Biden on Tuesday. The Democratic candidate is in a very close race with President Donald Trump in the state, which is key to winning the election.

During the rally, Obama pushed back on Trump's false assertions that Biden is a socialist. "You would think he was having coffee with Castro every morning," said Obama, adding that Trump "has been coddling dictators for the last four years and now apparently he says he may declare victory before all the votes are counted tomorrow."

He also encouraged the audience to vote in the name of democracy. "That's not something that a leader of a democracy does," he said, referring to Trump's statement that he will not allow votes to be counted after Tuesday night. "If you believe in democracy you want every vote counted."

Fonsi, who also accompanied Biden at the Democratic nominee's appearance in Florida during Hispanic Heritage Month, shared what it was like to speak alongside the former president. "Such an honor to share the stage with a true leader," he captioned an Instagram photo of the pair greeting one another.

Florida's early voting period ended Sunday. According for the Florida Division of Elections, more registered Democrats cast ballots during that period than registered Republicans — over 108,000 more. The state has 29 electoral votes and is usually won by extremely small margins. Obama won in 2012 by only 74,000 votes, while Trump won in 2016 by about 112,000.

Obama won the Florida Hispanic vote 60 percent to 39 percent. Since then, eligible Latino voters have grown to make up 17 percent of the state, but their alliances have also shifted. Cuban American and Venezuelan American voters in the state have recently been favoring Trump.