Representative Ron DeSantis, the Republican nominee for governor in Florida, drew accusations of using a racist dog whistle on Wednesday after saying in a television interview that voters should not “monkey this up” by electing his opponent, Andrew Gillum, who would be the state’s first black governor.

Andrew Gillum, Mayor of Tallahassee, FL.

Mr. Gillum, the mayor of Tallahassee, won the primary election in an upset on Tuesday night, handing a major victory to the liberal wing of the Democratic Party.

In the interview with Fox News on the first day of the general election campaign, Mr. DeSantis, 39, who has President Trump’s support, attacked Mr. Gillum’s candidacy by painting him as a far-left socialist.

“The last thing we need to do is to monkey this up by trying to embrace a socialist agenda with huge tax increases and bankrupting the state,” he said. “That is not going to work. That’s not going to be good for Florida.”

Terrie Rizzo, the chairwoman of the Florida Democratic Party, blasted Mr. DeSantis’s comments. “It’s disgusting that Ron DeSantis is launching his general election campaign with racist dog whistles,” she wrote on Twitter.

In a statement, Stephen Lawson, a spokesman for Mr. DeSantis, rejected the idea that the candidate’s comments had a racial undertone.

“Ron DeSantis was obviously talking about Florida not making the wrong decision to embrace the socialist policies that Andrew Gillum espouses,” Mr. Lawson said. “To characterize it as anything else is absurd.”

In an interview with Fox News on Wednesday after the controversy over the remarks took off, Mr. Gillum said Mr. DeSantis was taking a page “directly from the campaign manual” of Mr. Trump.

“In the handbook of Donald Trump, they no longer do whistle calls,” Mr. Gillum said. “They’re now using full bull horns.”

“I’m not going to get down in the gutter with DeSantis and Trump,” he added. “I’m going to try and stay high.”

Ron DeSantis Republican candidate accused of using Racist Dog Whistle in his race against Gillum.

The anchor who conducted the interview with Mr. DeSantis, Sandra Smith, said on air later in the day that Fox “does not condone” the language the Republican candidate used.

Monkeys have long been used in racist insults against black people, and many took note of that history. Sharon Austin, a professor of political science at the University of Florida, said she saw Mr. DeSantis’s language as a not-so-subtle racist dog whistle, similar to what many black politicians — including former President Barack Obama — have faced during their campaigns.

“Why, of all words, would you use the term monkey?” she said of the remark. “If you don’t know about the history of racist language, racist imagery about animals and apes and black men — that’s ignorance.”

Critics online said that Mr. DeSantis’s description of Mr. Gillum, 39, as an “articulate spokesman” for liberal views was another veiled racist message. The word “articulate” has a history of being used by white people to praise certain black people in a way that carries a troubling subtext of surprise at their intelligence.

In describing Mr. Gillum as an extreme leftist, Mr. DeSantis used a message similar to that of Mr. Trump, who wrote in a tweet on Wednesday that Mr. Gillum was a “failed Socialist Mayor” who has enabled “crime & many other problems to flourish in his city.”

Numerous Democrats who seized on Mr. DeSantis’s comments connected them to the president. “It barely took 12 hours for Trump yes-man Ron DeSantis to make a racist comment about his opponent,” Zach Hudson, a spokesman for the Democratic political action committee American Bridge 21st Century, said in a statement.

Mr. Gillum’s victory on Tuesday was propelled by an endorsement from Senator Bernie Sanders and financial support from Tom Steyer, George Soros and Collective PAC, a group dedicated to electing African-Americans. He supports universal health care, legalizing marijuana and abolishing the Immigration and Customs Enforcement agency — as well as impeaching Mr. Trump.

Mr. DeSantis’s own primary victory signaled the influence of Mr. Trump’s endorsements on state Republican races. Mr. DeSantis gained attention from conservatives last year by making television appearances on Fox News to defend the president, who responded with his own praise. Mr. Trump gave Mr. DeSantis a full-throated endorsement in June.

Florida Gubernatorial Candidates Andrew Gillum (D) and Ron DeSantis (R)

Mr. DeSantis and Mr. Gillum will face off for more than two months before voters go to the polls in November.

“It’s going to be a long and probably pretty ugly campaign,” Dr. Austin said.