Sen. Jeff Flake, R-Ariz., was caught on a hot mic Friday telling a Republican mayor that "if we become the party of Roy Moore and Donald Trump, we are toast."

Flake made the comment to Mesa, Ariz. Mayor John Giles following a town hall event at which Giles had asked Flake about the possibility of running for president in 2020.

"Can we start the presidential campaign today?" Giles asked Flake during the event, to scattered laughter from the audience.

Flake, who announced last month he would not run for re-election to the Senate in 2018, made the "toast" comment to Giles after the event had ended. It was picked up by his lapel mic and recorded by Phoenix TV station ABC15.

In response, Giles told Flake, "I am not throwing smoke at you but ... think how much fun it would be just to be the foil, you know, and to point out what an idiot this guy is," apparently referring to Trump.

"Anyway," Giles added, "hope you do it."

Flake, a longtime critic of the president, shrugged off the remark Saturday afternoon, tweeting "No news here. I've been saying this to anyone who will listen."

In a Senate floor speech announcing that he would not seek a second term, Flake criticized Trump for engaging in "reckless, outrageous, and undignified behavior." He also accused the Republican Party of having ""given in or given up on the core principles in favor of a more viscerally satisfying anger and resentment ... but anger and resentment are not a governing philosophy."

Flake has also been unsparing in his criticism of Moore, the Republican candidate in next month's Alabama Senate special election.

On Monday, after several women came forward to allege sexual misconduct by Moore, Flake said he would "run to the polling place" to support Democrat Doug Jones if he was an Alabama voter. Flake also said that he would vote to expel Moore from the Senate should the Republican candidate win the Dec. 12 election.

Flake has also criticized Moore in the past for stating that Rep. Keith Ellison, D-Minn., should not be seated in Congress because Ellison is a Muslim.

"When a judge expressed his personal belief that a Muslim should not be a member of Congress because of his faith, it was wrong," Flake said last month. "That this same judge is now my party’s nominee for the Senate should concern us all. Religious tests have no place in the United States Congress."

In response, Moore campaign adviser Brett Doster described Flake and Senate Majority Leader Mitch McConnell, R-Ky., as "agents of destruction within the Republican Party.

"They assassinate conservatives like Roy Moore so they can work with the liberal elite to protect their big government trough," Doster told Fox News late Saturday. "The people are tired of being told they are ignorant for demanding reform, and that’s why they will elect Roy Moore in 3 weeks."

Fox News' Dan Gallo contributed to this report.