HBO

[Warning: Veep Season 5, Episode 10 spoilers ahead.]

Veep is a show with a lot of small jokes that amount to one big one: Selina Meyer and her staff are politically successful, again and again, despite the fact that they are—and indeed sometimes because they are—extremely bad at their jobs. Meyer herself lucked into her presidency; the question throughout the fifth season of the consistently excellent HBO comedy was whether she could hang onto it on her own terms, by way of her own merit.

Many of the season’s plot lines suggested that, no, she could not. The first female president of the U.S. sent a sext to her boyfriend, the conflict-of-interest-tastic Wall Street banker Charlie Baird, from the U.S. president’s Twitter account; Meyer tried to blame the bumble on Chinese hackers. Then she attempted a Camp David Accord-style summit with the president of, yep, China. It … did not go well. And then, given a choice of which bank to bail out to prevent a recession, she rejected Charlie’s—the more sensible choice—to preserve both her public image and her own sense of her status as an independent woman.

The other question lurking in all this: Was Meyer due for a comeuppance? Could a show whose sharp satire relies on tragic-comic collisions of ineptitude and political power really reverse itself, message-wise? Could Meyer and her staff of ineptly Machiavellian insult-slingers ever really … lose?

It turns out: Yes. Sunday’s episode of Veep, “Inauguration”—the show’s fifth-season finale—stripped Selina of her ill-gotten presidency, and in a fairly humiliating manner to boot. The recent presidential election having led to a tie after Meyer lost a recount in Nevada, and the House of Representatives’s vote having ended in its own tie, things went to the Senate. Because of obscure legislative rules, that meant that the contest would become one between Tom James, Selina’s political frenemy, and Laura Montez, a New Mexico senator about audiences know little except that she has Mexican heritage and Sarah Palin hair.

Well. The old karmic philosophy ended up being true, in Meyer’s case: Another political frenemy betrayed her (unnamed) party’s tenuous coalition at the last minute, sending the presidency not to James, but to Montez.

It was a fitting thing to happen in “Inauguration,” to make the inauguration in question not Meyer’s but another lucky politician’s. There was, overall, a very comeuppant tone to the episode. Offenses and betrayals, large and small, that had been building since the beginning of the series took the occasion to explode, in various ways. Gary, Meyer’s sycophantic body man, finally lost his temper at his colleagues, blaming them for his boss’s loss. (“You fuckers. How dare you! that magnificent woman counted on you, and you losers let her down. All you fucking cared about was your stupid bad selves!”) Meyer, having realized that her best chance at A Presidential Legacy might lie in “freeing Tibet,” had spent the past several episodes working toward that end; in a Jimmy Carter-and-the-hostages-in-Iran twist of the knife, the Chinese leaders she’d repeatedly insulted freed a group of Tibetan lamas—and announced the news during President Montez’s inauguration, crediting the release to the new president’s efforts.

Personally, too, Meyer was felled. Her daughter, Catherine—who has spent Veep being alternately belittled and ignored by her mother—got a makeover. And, seeing her mother disheveled and hungover after a night spent mourning her loss, the newly glamorous First Daughter got to utter the line she’d been on the receiving end of so many times before: “You’re gonna do something with your hair, right?”

These were all significant tonal—and moral—reversals for a show that has assumed, for its previous seasons, that no bad deed goes punished. And “Inauguration” recognized the stakes at play in that shift. It repeatedly hinted that Meyer would find a way, in the end, to retain, and then to regain, the presidency; it teased with the notion that good luck, if not personal merit, would restore her to power. At one point, there were suggestions that Senator Montez might not have been born in the U.S. At another, there was an indication that Meyer might, at the very least, be returned to the role of vice president under a James administration. (This was suggested most strongly by the inept press secretary Mike’s insistence, at the outset of the episode, that he would stake his good name on the fact that Meyer would never, ever become Veep again; according to McLintock’s Law of Word-Eating, this would seem to guarantee that very circumstance.)

In the end, however, the Veep finale offered President Meyer—and, by extension, her audience—none of those soft consolations. The episode stripped her of power, not just politically, but also quite literally: As the outgoing president was making her ceremonial departure from the White House in Marine One, the helicopter suffered an engine malfunction. The vehicle and its occupants were forced to make an emergency landing in the middle of the Washington Mall; there were Meyer and the few staffers who remained loyal to her, broken and defeated and abandoned, forced to listen to the inaugural festivities for another president in the cold January rain.

It was perhaps a deserved end to the Meyer administration; it was also a profoundly sad one. Veep, whose creator Armando Iannucci also created the acerbic British comedy The Thick of It, answered The West Wing’s soaring optimism with cynicism; it answered House of Cards’s and Scandal’s scathing drama with petty human banality. That’s perhaps why Veep has been called, by real-life Washingtonians, “the most realistic show about politics”; it is also what has made the show such a delight to watch over its five seasons.

My colleague David Sims has noted that “if Curb Your Enthusiasm was the spiritual forbear of ... The Thick of It, then Seinfeld was Veep’s—never polemical, interested more in the byzantine rules of social interaction than their consequences.” Sunday’s episode of Veep was notably akin to Seinfeld’s iconic series finale: an attempt to bring a bit of moral accountability to a show that, by design, had previously offered none.

“Politics is about people,” Meyer has been fond of saying. But so, some say, is hell. And it was people, fittingly, who brought about Meyer’s downfall. It’s unclear where she—and the show—will go from here, whether she can work her way back up, or whether Veep will, in the grand tradition of real-life Washington, recast itself as Remunerated Lobbyist. What is clear, though, is that Veep, which like Seinfeld is in its own way a show about nothing, finally decided to care about something—and the result of that is an ousted president who has, for better or for worse, nowhere to go but up.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.