Nicole Wilder/ABC

Blame Lena Dunham for that wig. (Please, as if St. Shonda could ever do wrong.) And leave it to Lena Dunham to be responsible for one of Scandal’s biggest “OMG moments,” as the show’s commercials love to call them, this season.

In the lead-up to Thursday night’s episode, in which Dunham was a highly touted guest star, a laughably fake-looking wig she wore in promos for the otherwise very sleek and expensive-looking show lit Twitter on fire, 140-character curiosity over why the girl from Girls and one of Scandal’s buzziest guest stars yet would allow herself to look so damned ridiculous.

As it turns out, however, the broke-ass wig disaster perfectly sets the tone for the episode, a campy and fun hour that brought some much-needed levity to a very strong but very dark and disturbing season of Scandal. Sure, playing a version of Heidi Fleiss Goes to Washington is disturbing in its own way, but Dunham, bringing some of Hannah Horvath’s signature entitlement and unabashed sexual openness, is the perfect actress to bring some kinkier scandal to the show that bears that very name...and put a little confident pep into Olivia Pope’s step while she’s at it.

Dunham herself confirmed it in an interview with Seth Meyers, saying of the Twitter firestorm the wig ignited, “I do want to say, to save Shonda any tsuris, as we say in the Jewish community, I wanted to say that wig was my idea. This was not Shonda’s narrative choice.”

(Related: Lena Dunham talking about being on Scandal, as she did on Wednesday night’s Late Night With Seth Meyers, is just as much, if not more, fun than Lena Dunham being on Scandal. Seriously, the interview is about as charming as Dunham and Meyers, respectively, have ever been.)

Questionable—and still a bit confusing—wig choice aside, Dunham’s character was tailor made for the Girls star, which is perhaps unsurprising considering that the guest spot came about after Dunham and Rhimes expressed mutual admiration and Dunham—a true gladiator like the rest of us—expressed her desire to appear on the show. She played Sue Thomas, a Washington, D.C., millennial threatening to expose all of the high-powered politicians inside the Beltway she bedded through a sex-tinged dating website called Land-O-Kink. (Think Tinder for those hoping to stage their own real-life Fifty Shades of Grey.)

When the book proposal is leaked to the press, Abby is shocked to find that her boyfriend, Leo, is one of the men implicated. Fearing that being thought of as “the girl who dated the sexually weird guy” in the press will ruin her career, she goes to Olivia Pope to quash the book. When Olivia approaches Sue, Sue knows exactly who she is—she’s a super fan and admirer of her power, in fact—and turns the tables. She’ll kill the tell-all if the men who could possibly be identified in it pony up the $3 million she could receive from a book deal.

In a juicy monologue that allows Lena Dunham to be oh-so Lena Dunham-y, the Girls star proudly owns her sexual exploits when Olivia tries to shame her into backing down by insinuating that she’ll be called a whore. “I own my body and use it however I want with whomever I want, as many times in as many kinky ways I want,” Sue says.

Furthermore, she’s aghast that Olivia would even insinuate that she not move forward with the book. It’s not easy to go toe-to-toe with Kerry Washington when she’s delivering some of those classic Shonda Rhimes speeches from the mountaintop, but Dunham admirably holds her own. In turn, Sue sparks something in Olivia that starts to snap her out of the professional funk she’s been in since being rescued from her kidnappers. (This show, you guys.)

“What happened to you?” Sue demands. “Where did your power go? When did you start becoming so afraid of life?” And with that, Olivia Pope & Associates sets off to decode who all of the men are through details provided about their kinky sexual escapades in Sue’s book—a silly, fun sequence—to convince them all to chip in the money it will take to pay Sue off.

The biggest shocker arrives when it’s discovered that David Rosen is among Sue’s conquests. (He was going through a sad time, he says.) He’s worried that the book would get him fired, which in turn worries Huck, who needs David to keep his job as attorney general in order to grant him immunity in his own case against B-13. (So complicated, you guys.)

In any case, just as Olivia convinces Sue that she’s extorting these men illegally and pledges to help her get back at another man who’s wronged her in her past, Huck goes and—AND HERE’S THE BIG TWIST—kills Sue!

He slits her throat!

Blood sprays everywhere!

Screw the damned wig! Lena Dunham was just straight-up murdered in an episode of Scandal.

The whole thing comes out of nowhere, treading the fine line Scandal usually navigates so well, of twists that shock you to the core but aren’t so random that they seem baiting or narratively unbelievable. But there is enough desperation in Huck’s eyes as he justifies the killing—he really couldn’t risk David Rosen getting fired and ruining his whole immunity thing—that you simply just relish in another classic Scandal OMG moment rather than feel abused that a brutal act of violence just occurred for shock value’s sake.

As for the scene’s gore, Dunham said it best herself, tweeting during the episode: “SUE COULD NOT BE MORE DEAD.”

Of course, Twitter is an ugly place, and Dunham has some despicably gross critics. A quick scan of Twitter revealed their deplorable reactions to the character’s death:

So to temper the crass and baseless negativity, we’ll just say this: We loved Dunham’s appearance on Scandal. It was goofy and absurd in a way Shonda Rhimes shows have made just as much of their trademark over the years as their soapy twists and operatic romances and drama. Even the wig spoke to that. Dunham was given at least one really big scene, and she held her own with Kerry Washington in it.

It was a slight, silly episode, and Dunham was properly slight and silly in it. It was the perfect example of something meeting its hype. Did anyone really think Dunham’s guest spot would be more than that? And did anyone really want it to be, either?

After the episode, Dunham tweeted that Rhimes sent her a white hat after shooting the episode. And you know what? She deserved it. At the very least, it would cover that ghastly wig.