TALLAHASSEE, Fla. — Democratic candidate for Florida governor Andrew Gillum isn't a big fan of Donald Trump, but he said during a televised debate that he'd gladly work with the president to bring money to the state for needed projects.

"That's just not the way it works," said his opponent Ron DeSantis, who won the Republican nomination based on Trump's endorsement.

It was one in a series of testy exchanges during Sunday night's first debate between Gillum, the Tallahassee mayor, and DeSantis, who resigned his seat in the U.S. House to focus on the governor's race.

The two scuffled on the economy, race, and, of course, Trump, who came up when moderator Jake Tapper asked DeSantis if he thought Trump was a good role model for children. The question was based in part on a DeSantis primary ad featuring one of his children stacking toy blocks as DeSantis exclaimed, "Build the wall!"

DeSantis responded by saying he thought Trump did the right thing by moving the U.S. embassy in Israel to Jerusalem.

"I know Andrew didn't support that and doesn't think that's right," DeSantis said.

Gillum looked at Tapper and said, "I'm confused by the question."

"The question was whether or not he thinks President Trump is a good role model for the children of Florida," Tapper said.

"That's what I thought," Gillum said, drawing laughter from the audience. "No, he's not. Donald Trump is weak, and he performs as all weak people do. They become bullies, and Mr. DeSantis is his acolyte. He's trying out to be the Trump apprentice. At every turn he's tweeting him."

That's when Gillum said that despite his disgust for Trump's behavior, he wouldn't turn down help from the president if it helped Florida.

"You need to be able to work with the president," DeSantis said. "Andrew can't do that. He wants to impeach Trump, he's always saying bad things about him ... I think I will be better positioned to advance Florida's priorities because I have a productive relationship with the administration."

Gillum said doing what's best for the state shouldn't be about politics, noting that he's worked closely with Republican Gov. Rick Scott in the aftermath of Hurricane Michael, which left most of Tallahassee without power.

"This is not Russia. You shouldn't have to kiss the ring of the president of the United States for the president to see to the goodwill of the third largest state in all of America," Gillum said. "This is a democracy. We can dissent, we can disagree and where it comes to working together, we can do that too. If you want to look for an example, look at how Rick Scott and I worked with each other in the aftermath of this hurricane."

Gillum appeared calm, while DeSantis looked agitated, often shifting his eyes and moving his head from side to side and interrupting his opponent.

DeSantis said Gillum would hurt the state's economy by raising the corporate income tax and raising the minimum wage. And he repeatedly said that Tallahassee has the highest crime rate in the state, while Gillum repeatedly defended the city for being at a five-year low in crime.

Tapper brought up the fact that DeSantis said Florida voters shouldn't "monkey this up" by electing Gillum as Florida's first black governor and refused to return money from a donor who called President Barack Obama the N-word on Twitter.

DeSantis brought up his experience as a Navy officer and his time served in Iraq.

"When we're down range in Iraq, it didn't matter your race. We all wore the same uniform, we all had that American flag patch on our arm and that was end of story," he said. "I'll be a governor for all Floridians."

Gillum implied that DeSantis has aligned himself with racists through social media and speeches he's made.

"The monkey up comment said it all, and he has only continued in the course of his campaign to draw all the attention he can to the color of my skin," Gillum said. "And the truth is, you know what? I'm black. I've been black I'll my life and as far as I know, I'll die black."

Voters will decide between Gillum and DeSantis on Nov. 6.