It was the gasp heard in millions of living rooms around the country.

Thursday, Oct. 16, 2014. During the fourth episode of “How to Get Away With Murder,” Annalise Keating, the legal wizard and law professor played brilliantly by Viola Davis, finds herself at a crossroads. Submersed in inner turmoil, she faces one of the biggest and most terrifying questions of her marriage: Did her husband, Sam, kill the pregnant college student with whom he was having an affair?

Annalise is usually put together with a perfectly coifed wig, sharply tailored sheath dresses and stunning makeup, but this night it’s different. Seated at her vanity, she takes off her wig, revealing her short Afro, then peels off her lashes. After scrubbing her face clean, this gorgeous dark-skinned woman is stripped bare for the world to see: no contours, no filter, no mask to hide behind.

As Sam enters their bedroom, Annalise is finally ready to ask the question no wife should ever have to ask her spouse.

“Why is your penis on a dead girl’s phone?”

In that pearl-clutching moment, I knew I was going to be sucked in until the very end. Six seasons later, the end is upon us, as “How to Get Away With Murder” airs its final episode on Thursday.

This legal soap opera created by Peter Nowalk and co-executive produced by Shonda Rhimes served up countless dead bodies, entertaining clients-of-the-week, outrageous conspiracy theories and a diverse cast of lovable yet infuriating supporting characters. It gave the revered veteran actor Cicely Tyson the juicy role of Annalise’s mother, a character willing to do anything for her daughter, including commit arson and kill if necessary.

Image
Credit…Mitch Haaseth/ABC Television Network

But most important, the show gave us Annalise Keating, a character whose permission to be bad made her a pop-culture revelation. An openly bisexual character whose struggles with alcoholism and childhood abuse, as well as her unscrupulous legal tactics (among other things), made her one of the most complicated black women in television history.

Malcolm X once described black women as the “most disrespected” demographic in America. That sentiment still rings true, though now we’ve somehow also become this nation’s moral compass, the voting bloc expected to save this country from itself.

Each week, Annalise has slightly alleviated that pressure.

Yes, the pursuit of justice and the need to protect her students are always her primary motivations, but so is her personal survival — which is why she is a cunning liar, a master manipulator and, at times, a criminal. Just being in her presence can turn seemingly incorruptible law students into deceptive, monstrous killers who will do anything to please her.

With her, there are no clear lines between right and wrong, and when they go low, Annalise doesn’t go high — she simply knees them in the face. (Or she has her loyal, guilt-ridden underling Frank do the dirty work for her.)

For this we must tip our white hats to Annalise’s Shondaland sister Olivia Pope (Kerry Washington), who preceded her as a morally ambiguous black female protagonist on “Scandal.” Olivia’s daddy and mommy issues, coupled with an odd desire to give her life to the republic and the Republicans, found the antihero leading a murderous team of political fixers, carrying on an affair with a married president and rigging the election of said president.

Image

Credit…Nicole Wilder/ABC, via Associated Press

Olivia and all her unethical chaos ran so that Annalise could fly — and when the two finally came together for the crossover of all crossovers, the meetings of their brilliant and sinister minds gave us one of the most exhilarating #BlackGirlMagic moments yet.

These antihero qualities matter, because they have long been allotted to white characters only. Walter White on “Breaking Bad,” Carrie Mathieson on “Homeland” and Claire Underwood on “House of Cards” are allowed to be ruthless and fundamentally flawed. Too many black female characters fall victim to being one-dimensional or the embodiment of a model citizen as a means to defy every racist black trope.

But Annalise reminds us that respectability politics won’t save us in the fight for representation. The solution is to show the good, bad and ugly of who we are — the same as our white counterparts.

No one understood this better than Ms. Davis. It’s not a secret that throughout her decades-long career before being cast on “How to Get Away With Murder,” the quality of the roles she was frequently offered didn’t quite match her talent. Annalise Keating, a dark-skinned older woman who flaunted multiple lovers and affairs, was a way to change the game.

“Annalise Keating is completely different from anything anyone’s ever given me,” Ms. Davis said in 2015. “When someone is described as sexual and mysterious and complicated and messy, you don’t think of me. I thought it was a really great opportunity to do something different, to transform into a character that people weren’t used to seeing me in.”

And transform she did.

Some of the greatest performances embody conflict, trauma, duplicity, redemption and even trauma. Ms. Davis leaned into all of that, showing the world that yes, she may be a boss, but black women like her also feel pain and regret. We cry and are far from the indestructible superheroes or submissive mules the world would like us to be.

Even behind the scenes, she wasn’t afraid to speak up about who she needed Annalise to be, demanding ways to fill in the gaps the initial scripts and direction may have left.

Image

Credit…Emily Berl for The New York Times

A few years ago, Ms. Davis told an audience of Emmy voters that before she signed on to the show, she made it clear to the creator and producers that if she couldn’t take off the wig, she didn’t want the role. “Acting is like stripping naked in front of an audience and turning around really slowly,” she said, and by showing the reality of what real women look like, “I wanted to woman up, and I wanted to actor up, too.” This leveling up helped her win the Emmy for best lead actress in a drama in 2015, the first black woman to do so.

But this role was more than an amazing opportunity for Ms. Davis and an affirmation for all the black actresses who paved the way for her and the much-needed hope for those trying to break in now. It also set a thrilling precedent, showing all the daring and unexpected possibilities of who we can be on the screen.

We’ll soon know how Annalise’s story ends. Is she really dead? Will she live on to fight another fight, or will the system swallow her whole? Whatever the outcome, Ms. Davis finally found a role worthy of her talents. And through her character, black women like me saw a clearer reflection of ourselves.

Since Annalise first graced the small screen, the TV landscape has changed dramatically: Rutina Wesley on “Queen Sugar,” Retta on “Good Girls,” Regina King on “Watchmen” and others have emerged to help present a fuller spectrum of black womanhood.

Through them, Annalise’s rich legacy of glorious messiness lives on.

Kellee Terrell (@kelleent) is a filmmaker and journalist.

The Times is committed to publishing a diversity of letters to the editor. We’d like to hear what you think about this or any of our articles. Here are some tips. And here’s our email: [email protected].

Follow The New York Times Opinion section on Facebook, Twitter (@NYTopinion) and Instagram.