During a fiery debate on Wednesday night, the top three New York City mayoral candidates sparred over who has the right sort of experience to lead the city and how they would approach dealing with President Donald Trump.

The debate was the first time Democratic candidate and state assemblymember Zohran Mamdani, independent candidate and former Gov. Andrew Cuomo, and Republican candidate and Guardian Angels safety group founder Curtis Sliwa all faced off together — just weeks after incumbent Mayor Eric Adams suspended his reelection campaign.

All three candidates — who have clashed with Trump in different ways previously — were asked what they would say in their theoretical first official call with the president.

Pool/Getty Images - PHOTO: New York City Mayoral Candidates Face Off In Debate

Pool/Getty Images – PHOTO: New York City Mayoral Candidates Face Off In Debate

Eric Adams ends campaign for New York City mayor

Trump, who has indicated he might withhold federal funds from New York City if Mamdani is elected, has loomed over the race.

Cuomo said that during his first theoretical conversation, “I would say to the president — the first conversation, look, we have had many, many battles … and the battles were bloody, and I’d like to avoid them… I will fight you every step of the way if you try to hurt New York.”

Mamdani interjected, referring to the recent indictment of New York Attorney General Letitia James.

“Unless he weaponizes the justice system to go after the Attorney General of this state, in which case you’ll issue a statement that doesn’t even name the president,” Mamdani said, calling it an “act of cowardice.”

Angelina Katsanis/POOL/AFP via Getty Images - PHOTO: US-POLITICS-VOTE-NEW YORK-DEBATE

Angelina Katsanis/POOL/AFP via Getty Images – PHOTO: US-POLITICS-VOTE-NEW YORK-DEBATE

Democratic socialist Zohran Mamdani could be New York City’s next mayor. Here’s how it happened

Cuomo countered that, in his statement, he said “political weaponization of the justice system is wrong” when either party does it, including with James.

Sliwa, meanwhile, recalled his long “love-hate relationship” with Trump, and criticized both Cuomo and Mamdani for their rhetoric about taking on the president.

“Look, you can be tough, but you can’t be tough if it’s going to cost people desperately needed federal funds,” he said, referring to Trump’s threats to withhold funds from the city if Mamdani wins the election.

Sliwa, the Republican candidate, framed his approach as a middle ground, saying he would fight for funding for projects like the Gateway Tunnel project between New York City and New Jersey — which Trump said this week would be “terminated” — but he said he is not in favor of  the Q train project that would extend subway service on that line into Harlem.

Cuomo, later pressed on reports that the Trump Justice Department is investigating him over his handling of the COVID-19 pandemic as New York governor, said that he is “fighting for New York. I am not going to stop, and I’ll tell you something else: if the assemblyman [Mamdani] is elected, ‘Mayor Donald Trump’ will take over New York City — and it will be ‘Mayor Trump.'”

Angelina Katsanis/via Reuters - PHOTO: Candidates participate in mayoral debate in New York

Angelina Katsanis/via Reuters – PHOTO: Candidates participate in mayoral debate in New York

Mamdani tells ‘The View’ that withholding federal funds to NYC is one of Trump’s ‘many threats’

Cuomo faced questions about his past experience as governor, including the sexual harassment allegations that ultimately led to his resignation.

Cuomo called the allegations, which he has denied, “political,” and touted his experience as Secretary of Housing and Urban Development in the Clinton administration, as well as his tenure as governor.

“I got government to work. I passed groundbreaking laws, minimum wage, paid family leave, those projects that had never been built before,” Cuomo said.

Mamdani touted his experience as a New York state lawmaker, “fighting and winning for working class taxi drivers to free them from predatory debt and delivering the first free bus lines in New York City history, [and] working with unions and working class New Yorkers to finally raise taxes just that little bit on Mr. Cuomo’s donors to start to fully fund our public school.”

Pool/Getty Images - PHOTO: New York City Mayoral Candidates Face Off In Debate

Pool/Getty Images – PHOTO: New York City Mayoral Candidates Face Off In Debate

Cuomo then clapped back at Mamdani, saying, “This is not a job for someone who has no management experience to run 300,000 people, no financial experience to run a $115 billion budget. He literally has never had a job.” (Mamdani is a state legislator.) “His resume, it says he interned for his mother.”

Cuomo also added that “This is not a job for a first-timer. Any day, you could have a hurricane, God forbid, a 9/11, health pandemic.”

Mamdani interrupted, returning to Cuomo’s handling of the COVID pandemic, including referring to a controversial March 2020 directive to readmit COVID-19 patients back into nursing homes.

“If we have a health pandemic, then why would New Yorkers turn back to the governor who sent seniors to their death in nursing homes?” Mamdani said. “That’s the kind of experience that’s on offer here today. What I don’t have in experience, I make up for in integrity, and what you don’t have in integrity, you could never make up for in experience.”

Cuomo has defended his handling of the COVID-19 pandemic and blamed the outsized death toll in the state on a lack of leadership from the federal government during Trump’s first term.