New York’s current and most-recent former mayors slammed President Trump at an all-day gun-control forum in Iowa on Saturday — but first, Michael Bloomberg took a dig at one of the Democrats’ top presidential contenders.

Multibillionaire ex-Mayor Bloom­berg told the crowd at an Everytown for Gun Safety event in Des Moines about his backstage sassing of Sen. Elizabeth Warren for making the super­rich her political punching bag.

“If my company wouldn’t be successful, we wouldn’t be here today,” Bloomberg said he told Warren. “So enough with this stuff.”

Bloomberg founded Everytown and largely pays the nonprofit’s bills. He took the stage alongside almost every Democratic presidential hopeful — including his mayoral successor, Bill de Blasio.

Bloomberg recalled how Trump expressed support for stronger background checks after the February 2018 Parkland HS massacre in Florida.

“And then the NRA told him to drop it, so he did — immediately,” Bloomberg said.

“He didn’t have the guts to oppose the NRA then, and now he faces the same choice,” Bloomberg said of Trump, who this past week again expressed interest in getting a gun-owner background-check bill passed.

Bloomberg also spoke of a Washington Post report that the NRA’s Wayne LaPierre had warned Trump that the president’s his backers wouldn’t support stronger background checks.

“So now the president can either find the backbone to stand up to the NRA or once again he can bow down to the NRA and kiss Wayne’s ring — or maybe kiss something else,” Bloomberg said, drawing cheers.

Bloomberg had flirted with a 2020 presidential bid himself, before announcing in March that he would stay on the sidelines and continue to use his wealth to boost Democratic candidates and causes.

“I can’t say I agree with all of them on every issue and you probably don’t, either,” he said of the crop of 2020 hopefuls. “But I think we’d agree that all of them are better than the alternative.”

Later, de Blasio took the spotlight to demand consequences for gun retailers.

“It’s time to boycott Walmart,” he said. “It’s time to stop putting money in the hands of a company that puts out on the streets [guns] that kill innocent people. Right now they have to feel our wrath for change to happen.”

After the event, de Blasio expanded on his boycott call.

“Walmart has such a horrible history,” he told reporters. “You’re talking about a massive amount of guns that are available. They have to change.

“I’ve watched Walmart on labor issues, environmental issues, they only respond to pressure.”

The all-day event, hastily organized in the wake of last weekend’s mass shootings in Texas and Ohio, attracted about 700 activists from around the country — but scores flooded out of the building after the Democrats’ top-tier contenders, including Warren, Vice President Joe Biden and Sen. Kamala Harris, had taken their turns.