The Lonely Island understand pop music from the inside out. They also understand pop stardom from the inside out. As longtime ringers for — and consistently the best part of — Saturday Night Live, they observed and worked alongside some of the biggest celebrities and pop stars of their day. I’m talking your T-Pains, your Timberlakes, your Boltons. When they wanted to make a song called “I Just Had Sex” that sounded like something by Akon but expressed an oblivious dork’s unself-conscious jubilation over sexual intercourse, they were able to get Akon himself to sing the hook on it.

So when it came time for The Lonely Island to make their first movie, 2016’s Judd Apatow-produced Popstar: Never Stop Never Stopping, pop stardom was a natural target. More specifically, the film took on Justin Bieber, the angel-voiced Canadian man-child who has alternately seduced, appalled, and enraged a spellbound and apoplectic public with his drug- and arrogance-fueled shenanigans en route to being one of the most loved and hated men in the world.

Popstar’s satirical take on Bieber is Andy Samberg as Conner “Conner4Real” Friel, the pretty-boy breakout star of Style Boyz, a genre-hopping boy band that paired him with childhood friends Lawrence “Kid Brain” Dunn (Akiva Schaffer), a moody, resentful wordsmith, and Owen “Kid Contact” Bouchard (Jorma Taccone), the sunny, affable peacemaker and beat smith of the group.

When Style Boyz break up due to Conner’s selfishness, Owen swallows his relatively modest ego to DJ for his former bandmate, even when that means rocking a Daft Punk-style EDM light-show helmet that makes him look like an ecstasy-fueled Day-Glo Man in the Iron Mask and emits a noise and light akin to some Lovecraftian monster’s belch of the damned.

(Photo by Universal) Conner4Real behaves like an insanely entitled doofus, blundering across the globe as the quintessential ugly American.

As a dead-on parody of Justin Bieber, Conner4Real behaves like an insanely entitled doofus, blundering across the globe as the quintessential ugly American. He insults whole countries with his short-attention-span boorishness and inadvertently does everything conceivable to transform the public’s feverish, outsized love for him into seething hatred.

But because Conner is played by Andy Samberg, he has a sweetness and a vulnerability that belies the character’s purposeful obnoxiousness and makes him far more sympathetic and appealing than he really has any right to be. It also helps that Conner isn’t on top for long — he spends most of the film in a steep downward spiral after the gimmick-riddled release of his sophomore album (a follow-up to his debut, Thriller, Also) tanks his promotional tour and his career in short order. Nothing humbles and humanizes a narcissistic egomaniac quite like failure, and Conner’s long slide downhill offers a deep, rich sense of Schadenfreude not unlike similar reactions to the ongoing public humiliations of the real Bieber.

Outside of Conner, Popstar has the enviable problem of juggling too many great supporting characters and subplots to do justice to any of them, like a tragicomic (but mostly just tragic) subplot involving Conner’s party-hearty and spiritually lost mother, who is played by Joan Cusack with that distinctively Joan Cusackian sense of adorable heartbreak. The wonderful Tim Meadows, who seems to be getting better as he gets older, also makes an indelible impression as Conner’s manager, a world-weary show business survivor who never quite got over getting kicked out of Tony Toni Tone! back in the day. In a big, broad comedy with big, broad laughs, Meadows comes close to stealing the film with his understated delivery and the strangely affecting sense of pathos he brings to the role.

In the theatrical version of Popstar, Sarah Silverman is predictably under-utilized as Conner’s no-nonsense publicist, the only person in his life (other than Lawrence, who isn’t really in his life) who tells him the unvarnished truth, which Conner interprets as a never-ending sarcastic goof. Yet her character — and many others — are rounded out in the deleted scenes found on the film’s essential DVD. Separately and collectively, these deleted scenes would have made the 84-minute comedy funnier and deeper on an emotional level, but it’s hard to begrudge a movie with so little fat and so much funny.

The embarrassment of riches extends to its use of music. Popstar gallops along at such a pace that we only get to hear little snippets of the brilliant, funny, and weird songs delivered via elaborate production numbers. I’m speaking of tunes like “Mona Lisa”, which is at once a much-needed response to Da Vinci-extolling numbers by the likes of Nat King Cole and a devastating lampoon of Americans who travel the world expecting it to be as endlessly and easily stimulating and familiar as their Facebook or Twitter feeds. And, let’s face it, to 21st century eyes, Mona Lisa ain’t exactly Scarlett Johannson. It’s about time a truth-teller like Conner dispelled the poisonous myth of her attractiveness.

(Photo by Universal) Popstar imbues a totally absurd reality with a genuine emotional core.

Popstar offers the perfect balance of Apatowian raunch and heart, particularly evident in a scene where Conner and Lawrence have an animated disagreement while a fan’s naked penis angrily fights for attention in the background of the frame. Both sides of that equation — the heated and emotionally authentic argument between two people who once loved each other and the nude male genitalia demanding and receiving the audience’s attention — are quintessential Lonely Island and help define the film’s weird balance of unexpectedly deep emotion and expectedly frequent dick jokes.

Perhaps also due to Apatow’s influence, Popstar has a warm breathing heart and emotional core, while previous Lonely Island productions like Hot Rod mocked the very conceit that human beings might feel anything for one another. The further Conner plummets from his place high atop the socio-economic and show business ladder, the more he’s drawn back into the orbit of his old bandmates, particularly after Owen “parent traps” Conner and Lawrence, tricking them into a reluctant reunion.

Popstar‘s genuine emotional core comes from the decades the leads have spent working together. Its dynamic echoes that of The Lonely Island itself — they’re all huge talents and multi-hyphenates (while Samberg is the lead, the other members co-directed, and all three co-wrote the script), but Samberg is undoubtedly the star, the frontman, the Justin Timberlake of its N’Sync. You can feel the dense, complicated, bittersweet tapestry of resentment and appreciation, nostalgia and zealously held grudges, love and visceral, long-simmering hate that exists between artists who’ve worked intimately with each other for decades and carry that baggage into every emotionally loaded interaction.

Part of what makes The Lonely Island such a delight is its sneakily sincere appreciation of pop song craft and the dizzy, ephemeral pleasures of the pop world. Popstar may be cynical about the fickle nature of pop stardom and the parasites who flock to big, dumb sheep like Conner, but it’s also clued in to the joy that pop music can bring, even if it’s from an overgrown child like Justin Bieber or Conner4Real.

This is most evident in a climactic reunion performance featuring cameos from Usher, Michael Bolton, and frequent collaborator Justin Timberlake (who has a small but fun role as Conner’s adoring personal chef) that, like the climax of Walk Hard, is both a ridiculous and inspired parody of rock and roll pretentiousness and epic self-delusion, and a catchy, infectious, and memorable anthem that’s weirdly beautiful despite its ridiculousness.

That isn’t the film’s only resemblance to Walk Hard, though. Like Dewey Cox, Conner4Real is such a funny and appealing character from such a perfectly cast actor, singer, and songwriter that he almost threatens to transcend the cultural context and become sort of a bizzaro-world pop star in his own right, like Spinal Tap, which released a number of albums that had nothing to do with the movie that made them cult stars.

(Photo by Glen Wilson/Universal) It gets us to root for Conner, to feel for Conner, to believe in his fundamental goodness.

Still, Popstar gets us to laugh at Conner4Real. That’s no small feat, given how difficult it is for mainstream comedies to be funny at all, let alone this consistently hilarious. More impressively, it gets us to root for Conner, to feel for Conner, to believe in his fundamental goodness and capacity for emotional growth and redemption.

That Popstar works emotionally as well as comedically may be a testament to the Apatow touch, or it may be a lucky byproduct of the movie being made by three people who are friends and life partners, not just people thrown together by a casting director and asked to fake a lifetime of camaraderie and simmering resentments.

That was true of Spinal Tap as well. It too was the work of musician funny-men (not the most common or most respected breed) who had been performing, writing, and playing together for decades, sometimes, appropriately enough, during their stints on Saturday Night Live, although heaven knows their runs on SNL were not career highlights for Harry Shearer, Christopher Guest, and Michael McKean.

The same cannot be said of The Lonely Island, who made the most out of their time on Lorne Michaels’ eternally uneven and maligned sketch comedy show as its digital filmmakers. They wrote an unlikely seaboard anthem in “I’m On A Boat” and were honored with a Grammy nomination and the undying affection of the cruise industry for their work. More importantly, they perfected their craft alongside the very pop stars whose essence they were gleefully lampooning.

The commercial under-performance of Popstar is disappointing but ultimately not terribly surprising. After all, This Is Spinal Tap, UHF, and Walk Hard didn’t exactly set box-offices aflame either, but while more successful movies have subsequently been forgotten, their cults only continue to expand. That’s not bad company to share. Though Popstar is about the biggest kind of mainstream pop star, it always seemed both blessed and cursed to live and die — and then live on again — forever as a cult movie.

Original Certification: Fresh

Tomatometer: 77 percent

Re-Certification: Fresh

Nathan Rabin is a freelance writer, columnist, the first head writer of The A.V. Club and the author of four books, most recently Weird Al: The Book (with “Weird Al” Yankovic) and You Don’t Know Me But You Don’t Like Me.

Follow Nathan on Twitter: @NathanRabin