Former congressman Anthony Weiner, who resigned in disgrace amid a sexting scandal, said Tuesday he would only come out of political retirement to run against Donald Trump Jr. in a race for the mayor of New York City and said he would beat him “like a rented mule.”

Trump Jr., the son of Republican presidential nominee Donald Trump, has been floated as a possible challenger to Democratic Mayor Bill de Blasio in 2017 since his well-received speech in support of his father at the Republican National Convention last week in Cleveland.

Weiner, a Democrat, was attending his party’s national convention in Philadelphia and was asked about the rumored Trump Jr. candidacy. Weiner suggested that he would return from political exile to take on the son of the billionaire real estate mogul.

"The only thing that could make me come out of retirement and run for mayor again is if anyone named Trump ran," Weiner told WNYW-TV. "I would come out of retirement just to beat him like a rented mule, and then I'd turn the keys back over to de Blasio."

Trump Jr. retorted on Twitter that Weiner, who resigned his congressional seat after admitting he sent sexually explicit messages to women who weren't his wife, should get lost.

Trump Jr., an active campaigner who also is helping to run his father's business, has pointedly not ruled out entering politics. But Trump has made clear that Trump Jr. won't be running for mayor next year.

"Donald Trump Jr. has no intention of running for mayor of New York, but I was the one who predicted that Anthony Weiner would flame out and not be able to run for mayor," Trump said in a statement. "People were amazed at how insightful I was."

Weiner unsuccessfully ran for mayor in 2005. He resigned his congressional seat in 2011. He made another bid for mayor in 2013 and was leading several polls until it was revealed he had continued the questionable behavior after his resignation. He now works as a pundit and consultant.

Weiner's wife, Huma Abedin, is a top adviser to Hillary Clinton, the first woman to win the convention votes needed to claim the presidential nomination of a major U.S. political party.

The Associated Press contributed to this report.