The joke was on Justin Bieber last night at the pop star's Comedy Central Roast -- but he took it like a pro!

We had already gotten a peek at some of the comedians' jabs at the 21-year-old pop star (not to mention Bieber's heartfelt apology for acting like a brat over the last year or so), but after watching it, this might have been one of the best roasts ever!

Kevin Hart hosted the roast, and Shaquille O'Neal, Martha Stewart, Snoop Dogg, Will Ferrell, and Ludacris were among the many stars who took shots at the Biebs. There were a number of jokes about Justin's ex (Jeffrey Ross quipped, "Selena Gomez wanted to be here, but she's dating men now"), and at a few points the Biebs was visibly uncomfortable when SG's name was brought up. And Bieber's pal Chris D'Elia took a pretty deep dig too! At the beginning of the roast, he said, "You are about to get f*cked harder than Orlando Bloom f*cked Selena Gomez." Wow!

After they were done with Selena, roasters couldn't resist ragging on the singer's appearance. Snoop joked, "Justin, you so motherf*cking pretty, when the inmates saw your mug shot they swiped right," while D'Elia said, "For a guy worth $200 million, why do you dress like Sharon Stone in the '90s?"

Of course, Justin may have had the last laugh, as he joked towards the end, "What do you get when you give a teenager $200 million? A bunch of has-beens calling you a lesbian for two hours."