Republican gubernatorial candidates Ron DeSantis and Adam Putnam faced off in a nationally televised debate Thursday, and Donald Trump was the star of the show.

Florida Agriculture Commissioner Putnam gushed about the president, vowing to support his reelection in 2020 even though Trump has endorsed DeSantis.

"I look forward to campaigning with him as governor of Florida," said the agriculture commissioner, drawing a swift rebuke from DeSantis.

"That would be the first time he ever campaigned with him because when Donald Trump was trying to to win Florida in 2016, Adam Putnam did not attend a single rally with him," said DeSantis. "You couldn't find Adam Putnam if you had a search warrant."

Trump remains extremely popular among Republican primary voters, and he came up over and over again during the hour-long debate aired on Fox News.

DeSantis mentioned Trump by name 21 times, Putnam mentioned him five times.

Both candidates delivered confident and forceful performances with no reluctance to criticize one another. A rowdy crowd of 1,000 Florida GOP activists often cheered so loudly moderators Martha MacCallum and Bret Baier struggled to be heard.

Putnam, 43, took a shot at DeSantis, 39, for appearing constantly on Fox News and only sporadically on the campaign trail in Florida.

"It's completely different from a Washington D.C. studio," Putnam said of the Florida-based event. "Welcome to Florida, congressman."

DeSantis retorted he wished he could spend more time in Florida rather than fulfill his responsibilities – especially when he missed Christmases with his family in 2006 and 2007 as a JAG officer in Guantanamo Bay serving in Guantanamo Bay and Iraq.

The stakes Thursday night were especially high for DeSantis who is running out of time to overtake frontrunner Putnam.

Elections officials start sending mail ballots in four weeks – two weeks for overseas voters — and multiple polls show Putnam with a double-digit lead over DeSantis.

Still, nearly one in four Republicans remain undecided according to recent surveys, and DeSantis used the nationally televised forum to cast Putnam as weak on immigration and part of the politics-as-usual crowd. Putnam has spent the last 22 years in elected office.

The Palm Bay Republican repeatedly noted that Putnam has supported the controversial "Gang of Eight" immigration bill and opposed an "E-Verify" program aimed at requiring Florida employers to check a potential employee's legal status.

"He won't do that because the Big Ag donors that fund his campaign want that cheap labor," DeSantis said.

Putnam, from Bartow, responded by falsely accusing DeSantis of supporting welfare for illegal immigrants.

As the topic of Trump kept coming up, Putnam deflected with his campaign mantra: Florida First.

"I care more about the schools in Washington County than what's going on in Washington, DC. I care more about what's going on in Ruskin, Fla., with congestion and infrastructure and the quality of our water than I do about what's going on in Russia," Putnam said. "And I care about about the other St. Petersburg — St Petersburg, Fla."

Both candidates touted their commitment to fighting gun control, and Putnam defended his agency's record which included issuing concealed weapons permits to 291 people who were later deemed ineligible.

"When I learned that we had an employee that was not doing that job, I held them accountable," he said. "Floridians are safe. The individuals who let us down is no longer in our department and I held them accountable. That's what leaders do."

Responded DeSantis: "He didn't act like a leader because he covered it up. It was discovered by the media," referencing a Tampa Bay Times story that first reported the lapse from Putnam's office.

DeSantis noted that Putnam didn't tell Rick Scott, who was surprised and called it "disturbing."

"You have to level with constituents and not try to cover it up," he said.

The Fox News moderators quizzed the candidates on a variety of boilerplate conservative issues, but asked few questions specific to Florida. The candidates weren't asked about the state's education or the environment, two topics frequently discussed by the Democratic candidates, or taxes and jobs, the top priorities of the man they want to replace, Gov. Rick Scott.

On trade, DeSantis said he has assurances from the White House that Trump's antagonistic rhetoric toward America's trading partners was strategic and he doesn't expect higher tariffs to be a long-term strategy.

"Donald trump wrote the 'Art of the Deal.' He knows how to negotiate," DeSantis said. "I think we should give him a chance to do his thing."

Putnam said he was the encouraged by the prospects of a trade war, accusing China and Mexico of hurting Florida farmers and cattlemen.

Neither was willing to lay the blame for the current state of American civility at the feet of the president, who as a candidate encouraged crowds to rough up protesters and assigned derogatory nicknames to his political opponents, including dubbing Florida's U.S. Senator, "Little" Marco Rubio.

Instead they pointed at California Congresswoman Maxine Waters, the media and President Barack Obama.

The Sunshine Summit continues Friday with speeches for all major statewide candidates and assorted Republican pundits, advocates and celebrities, including Matt Schlapp of the American Conservative Union, Grover Norquist of Americans for Tax Reform, Kentucky Sen. Rand Paul, and filmmaker Dinesh D'Souza

The only other Republican debate scheduled at this time is for Aug. 8, airing only on a local TV station in Jacksonville.

Major Democratic candidates running for governor include Tallahassee Mayor Andrew Gillum, former U.S. Rep. Gwen Graham of Tallahassee, investor and former U.S. Senate candidate Jeff Greene of Palm Beach, developer Chris King of Winter Park, and investor and former Miami Beach Mayor Philip Levine.

The primary is Aug. 28.

RELATED COVERAGE: Adam Putnam's office stopped reviewing concealed weapons background checks for a year because it couldn't log in

Meet a supporter of Adam Putnam and Ron DeSantis awaiting their debate

Adam Putnam wants to know: 'Where's Ron?'

Times staff writer Emily L. Mahoney contributed to this story.