In July 2008, John McCain released an attack ad against Britney Spears and Paris Hilton. Well, against Barack Obama, too. The image of the then-senator from Illinois was juxtaposed with the two uber-famous blondes while a concerned narrator called Obama “the biggest celebrity in the world” who also happened to lack experience and would increase America’s dependence on foreign oil.

By that point Obama did indeed seem closer to the celebrity class, and more comfortably of celebrity status, than most previous presidential candidates. Will.i.am. had rounded up half of Hollywood to sing along to an Obama speech for a music video called “Yes We Can.” Oprah had given him her first political endorsement ever. And he’d recently toured Europe to great applause. McCain’s ad suggested there was something unseemly in all this human spectacle.

Why, exactly? Celebrities are celebrities, theoretically, because people like them. But Spears and Hilton, the bogeywomen of the McCain ad, embodied the ways that likability can curdle. The ad implied that Obama could turn out to be a Britney or a Paris. In the Britney scenario, he’d crack under pressure. In the Paris scenario, we’d get sick of his shtick. In either case, he’d be exposed as false.

Eight years later, whatever you might think of Obama’s job performance, his celebrity aura hasn’t seemed to hurt him much, if at all. The White House has become a bit hipper than it had been under previous presidents, with a number of young stars from the pop and hip-hop worlds stopping by (as well as a more typical array of venerated literary, musical, and artistic figures). The Obamas, in turn, have acted as performers themselves—slowjamming on Fallon, dancing on Ellen, impersonating Kevin Spacey—without triggering major scandal or outsized ridicule. In their engagement with pop culture, the Obamas have created the impression of edginess while also strategically exercising restraint. They’ve harnessed the entertainment-industrial complex without kowtowing to it.

Never was that clearer than this week, when the White House hosted the cast of Hamilton and the first couple made their debut at the South by Southwest tech and music festivals. As America turns its attention to the election for their successors, we may be witnessing the final push in the Obamas’ cultural front. “This platform is so unique,” Michelle Obama told The Verge for a story about her social-media efforts that published on Monday. “We will never have it again. So we will spend these 12 months on every issue making sure we’re driving to the very end. We figure we want to drop the mic on some of this stuff.”

* * *

Hamilton is the Broadway smash that reinterprets the journey of America’s first treasury secretary, Alexander Hamilton, as a rollicking rap adventure largely cast with people of color. It’s also perhaps the strongest and most impressive claim Barack Obama can make to influencing pop culture. The first time the playwright Lin Manuel Miranda performed a Hamilton tune in public was at a 2009 White House poetry jam, where he tested out what would become the musical’s title song and opening number.

When introducing a performance from Manuel and other cast members in the East Room on Monday, Obama brought that fact up. He said that while his family is obsessed with Hamilton, Hamilton needed Obama to happen. “Not to take undue credit or anything, this is definitely the room where it happened,” he quipped. It was a classic Obama one-liner: a hip reference used for a dad joke, with the underlying punchline being less about the subject at hand than about Obama’s own power. Hamilton is the biggest musical in the world, but he’s not starstruck. He’s bigger than it. It owes him.

The truth is, they both owe each other some things. Hamilton has frequently been identified as the ultimate “Obama-era” cultural artifact, most substantively in a New Yorker piece by Adam Gopnik. On one level, there’s the fact that Hamilton’s portrayal of the founding fathers and mothers as black and brown takes on special significance when there’s a black commander-in-chief. “It is President Obama’s point about America’s open-ended and universally available narrative brought to life on stage,” Gopnik wrote.

On another level, Hamilton’s storyline spotlights the kind of oft-thwarted battle for progress—and to marry idealism with pragmatism—that has often agonized Obama’s supporters after hopey-changey 2008. Gopnik argued that Miranda had completed a long-brewing transition in historical interpretation among liberals from aligning themselves with Thomas Jefferson to aligning themselves with Hamilton:

... a Hamiltonian liberal is an ex-revolutionary who believes that the small, detailed procedural efforts of the federal government to seed and promote prosperity are the ideal use of the executive role. Triumphs of this kind, as the show demonstrates, are so subtle and manifold as to often be largely invisible—and are most often as baffling and infuriating to those whom the change is designed to serve as they are to those whom the compromises are meant to placate. [...] If Hamilton’s program could be reduced to a phrase, after all, it would simply be that the national government should try, directly or indirectly, to loan money to manufacturers. Obama’s efforts and triumphs in this direction have been, as Hamiltonian ones often are, obscured, but real.

Gopnik suggested that Miranda ended up offering this Obama-friendly message less by design than by intuition. If you look around at the major politically themed works of culture in the past seven years, you often find a similar focus on process, competence, and incremental change for the common good. Steven Spielberg’s Lincoln showed one of the most idealized presidents in bargaining mode; Zero Dark Thirty portrayed the defeat of Osama bin Laden as the result of scut work; even the cynical House of Cards has fun imagining a Democratic president murdering ideology in pursuit of concrete policy achievements. It’s not far-fetched to speculate that these are the sorts of works that result when Hollywood watches the charismatic force it helped elect labor unspectacularly, day after day, against gridlock.

Hamilton at the White House also stands as an example of the work that the Obamas have done to recognize hip-hop’s cultural centrality. Embracing rap has never been a politically neutral act, both because of lyrical content but also, many of the genre’s fans would argue, because of ingrained attitudes about race and class in much of the country. But Obama’s ’08 campaign involved the support of rappers and provided an iconic moment when Obama borrowed Jay Z’s “Dirt Off Ya Shoulders” move. In 2011, he invited the rapper Common to a White House poetry event, causing some backlash from conservatives despite the fact that Common is among the least controversial emcees imaginable.

A Washington Post column in 2015 by Erik Nielson and Travis L. Gosa argued that after the Common criticism, Obama backed away from rap, spotlighting no hip-hop in his 2012 campaign playlist and forgoing rap shows in the White House. This may well have been the case—an example of Obama’s caution about overdoing things when engaging pop culture. But in recent months, he’s shown his rap fandom again. Earlier this year, Obama invited Kendrick Lamar to the Oval Office after naming “How Much a Dollar Cost,” a deep cut on To Pimp a Butterfly, one of his favorite songs of 2015. Wale has performed at multiple presidential events. These gestures have gone appreciated in the rap world. On Instagram, the rapper Fabolous wrote:

Hip-hop used to be a political scapegoat, the black cat of America, the reason for everything wrong even while being the largest growing music and the corporate world getting rich off our style, jingles and consumers. We watched hip-hop become a universal language through all its backlash and ridicule. And Obama was the first President to even take pictures with our favorite artists, invite them to the White House, even drop lines in his speeches.

If there’s anything that underlines the idea of hip-hop as a newly universal language, it’s Hamilton—both the musical itself and its conquest of the Great White Way and the White House. To say Obama is responsible for the wider shift in America that has enabled Hamilton’s success would be incorrect, of course. He is a beneficiary of that shift, and he has in turn, subtly, helped it progress further. The best digital artifact to have come from the Hamilton cast’s D.C. visit is probably the video of Miranda freestyling based on cue-cards held by the president. Miranda, as is always the case, is frenetic, flustered, and brilliant. Obama puts in minimal energy, acting impressed but not too impressed. He knows what he’s giving and getting by simply participating. He only drops the facade for a moment, at the end: “You think that’s going viral? That’s going viral.”

* * *

It’s easy to forget that virality is a concept that barely existed in popular discourse prior to the Obama presidency: Twitter, Facebook, Snapchat, Instagram, and Tumblr all either came about or grew to ubiquity in the past seven years. Celebrities of both the political and non-political sort have used these platforms to great success and to great accidental embarrassment. The Verge’s Michelle Obama profile this week offers a look at how the White House has tried to avoid the latter. At one point, the writer Kwame Opam asks Michelle to perform the Dab—Cam Newton’s famous touchdown move—on camera, with hopes of going viral. Hillary Clinton had done it on Ellen already, after all. But after some discussion with her team, Michelle declined the request on the grounds of “dabbing’s hazy connection to marijuana culture.” Maybe that’s a legitimate objection, or maybe it’s a front for some greater calculation about how much the First Lady should give and withhold from the public.

As the holder of no elected office, Michelle has, in the way of presidential wives before her, used her time in the White House on mostly non-partisan causes: helping veterans, reducing childhood obesity, encouraging college enrollment, and promoting education for girls around the world. She has no official budget to spend on these things, so she’s savvily instead cashed in on her celebrity to promote awareness. Athletes, actors, and major singers have put on exercise clinics, concerts, and fundraisers for the First Lady’s initiatives. In turn, pop culture has spontaneously reified her as the pinnacle of female badassery, most notably on Fifth Harmony’s hit “Bo$$.” The chorus: “Michelle Obama / purse so heavy getting Oprah dollars.”

Beyoncé rewriting and rechoreographing “Get Me Bodied” for a “Let’s Move” video distributed to schools across the country was a particularly deft move—and an example of yet another strategic partnership that subtly places the Obamas higher in the celebrity hierarchy than even the world’s biggest entertainers. Beyoncé provided the soundtrack for their first presidential dance; for the 2012 campaign, she wrote Michelle a fawning open letter and held an Obama fundraiser with Jay Z; she sang the National Anthem at the second inauguration. In return? When accused of exempting the Knowles-Carters from rules against traveling to Cuba, Obama laughed it off and the State Department provided the documents to show that no quid pro quo had taken place.

The latest Michelle Obama celebrity charm offensive is in service of her Let Girls Learn campaign, when she triggered a wave of spit-take headlines saying she was releasing a charity single featuring Missy Elliott, Kelly Clarkson, Zendaya, Janelle Monae, and other pop artists. When the song arrived online, it became clear that Obama herself was not actually on the song. Of course she wasn’t: The Obamas make culture work for them, not the other way around. In an essay for Lena Dunham’s newsletter, Obama said she didn’t sing on the track because she can’t carry a tune. But at the South by Southwest keynote panel where she sat alongside Elliott, Queen Latifah, the songwriter Diane Warren, and the actor Sophia Bush, she did sing a snippet of Boyz II Men’s “It’s So Hard to Say Goodbye to Yesterday” when asked about having to leave the White House soon. The crowd not only whooped in delight—the other women on stage did.

The moment recalled what might be the out-and-out coolest moment of Obama’s presidency, when Barack crooned some Al Green onstage in the midst of a speech. The shock and the instant acclaim came in part from hearing the president sing so well. But it was also came from hearing him sing at all. “I’m so in love with you” he began, then stopped and grinned. Six words were all he’d give—an entertaining reminder that the president is not, despite occasional appearances, here to entertain.