President Trump was right to suggest cooperators or "flippers" should be outlawed, a reputed Philadelphia mob boss said outside a Manhattan court Wednesday after being sentenced to two years in prison for illegal betting.

Joseph “Skinny Joey” Merlino, 56, chuckled when making the comment as he walked away from Manhattan Federal Court.

“President Trump was right. They need to outlaw flippers,” Merlino said, according to The New York Post.

In April, Merlino agreed to plead guilty to illegal betting to avoid a retrial in a racketeering case that ended with a hung jury in February. Mobsters "flipped" and testified against him in the trial, the paper reported.

Trump criticized "flippers" who cooperate with prosecutors to get a reduced sentence during a "Fox & Friends" interview with Ainsley Earhardt in August.

“I’ve seen it many times, I’ve had many friends involved in this stuff. It’s called flipping, and it almost ought to be illegal,” Trump told Earhardt. “It’s not a fair thing.”

Special Counsel Robert Mueller has relied on numerous cooperators in his probe of Russian interference in the 2016 presidential election.

At the February trial, Edwin Jacobs, Merlino's defense attorney, told jurors that Merlino was framed by compromised turncoat mobsters seeking leniency for their crimes.

Judge Richard J. Sullivan sentenced Merlino to the maximum two-year term, though Merlino's plea deal called for him to get as little as 10 months in prison.

Merlino must report to prison in 45 days.

The Associated Press contributed to this report.