[This story contains spoilers from the series finale of HBO's Veep, titled "Veep."]

Veep punched its final ballot with Sunday's time-jumping series finale and the HBO political comedy cast its final vote — and then, in a flash-forward, laid that winner to rest.

The episode's full-circle title — "Veep," which was written and directed by showrunner David Mandel — primed discerning viewers of the Emmy-winning series to expect that anything could happen. Leading up to the final season, the cast even collectively said the final joke would be one that no one would see coming.

In the supersize, 45-minute ender, Veep delivered on that element of surprise.

In her own words while accepting her party's nomination for the presidency, Selina Meyer (Julia Louis-Dreyfus) spoke about all the sacrifices she made in order to get to the convention stage. Indeed, while a brokered convention played out over the course of days, Selina sold out everyone and everything in her orbit in order to secure the nomination.

Ben Cafferty (Kevin Dunn) suffered a heart attack and with her closest staffer out of the game, Selina was left to her own devices. When faced with the possibility of losing, Selina proceeded to take out her opponents one by one as the ghosts from real-life conventions past took a form on screen. The tide turns in her favor when late-in-the-game candidate Tom James (Hugh Laurie) is taken out by a sexual harassment accusation and, instead of choosing the right candidate to be her running mate, Selina asks the wrong one, Jonah Ryan (Timothy Simons), to run as her Veep instead of Kemi Talbot (Toks Olagundoye).

Selina's Jonah pick is too hard for even Kent Davison (Gary Cole) to digest and her longtime strategist quits. Her daughter and daughter-in-law, Catherine Meyer (Sarah Sutherland) and Marjorie Palmiotti (Clea DuVall), write off Selina forever when she trades same-sex rights for the support of challenger Buddy Calhoun (Matt Oberg) and, in the biggest betrayal of all, Selina names dedicated bagman Gary Walsh (Tony Hale) as the fall guy for the FBI's investigation into the Meyer Fund, which was the only remaining card that could ruin her.

In the end of the present-day storyline, Selina gets everything she has ever wanted and secures the presidency. When Veep flashes six months ahead, Sue Wilson (Sufe Bradshaw) is back as President Meyer's secretary and she refuses to let Veep Ryan, or his chief of staff Amy Brookheimer (Anna Chlumsky), into the Oval Office to see the president. Though the moment is a full-circle nod to Jonah now being in Selina's former Veep shoes — a job she called "a fate worse than death" to Amy when telling her to convince Jonah to accept — any moment of enjoyment is certainly fleeting. Inside the Oval Office, Selina is alone as she calls out for a Gary that is no longer there. Now surrounded by a new team of incompetence made up with Keith Quinn (Andy Daly) and Tom's accuser (Rhea Seehorn), Selina's presidency is a picture of a woman who got the power she wanted at an unbelievable price.

Then Veep jumps 24 years to the funeral of the one-term former President Meyer. Mike McLintock (Matt Walsh), who is still an anchor on CBS News, lays out the scene: Selina indeed got many of the things she previously wanted, as viewers hear how Meyer (who was 75, 76 or 77 when she died) is buried in her presidential library at Smith College (a callback to the events of season six). In attendance are her former rivals, including the beloved trio of former President Montez (Andrea Savage), two-term former president Kemi Talbot and — in the biggest twist of all — President Richard Splett (Sam Richardson), a historic two-term president at that. Before the time jump, Selina offered Richard a position in her administration, as long as he fired Dan Egan (Reid Scott), and the dark-horse character of Veep — who has gradually been rising in the final season — was being hailed as the future of the party.

The funeral gave viewers an update on the status of the original group: Ben died; Kent left politics to become a watchmaker; Dan, with a young wife on his arm, is a successful-looking real estate broker; and Amy married Bill Erickson (Diedrich Bader).

The who's-who guest list showed viewers that nearly everyone outlasted Selina — including Roger Furlong (Dan Bakkedahl) and his aide Will (Nelson Franklin), former Veep Andrew Doyle (Phil Reeves) and even Selina's presumed dead ex-husband Andrew Meyer (David Pasquesi), who makes a blink-and-you'd-miss it appearance (following his cameo in Norway). Jonah, who wasn't invited to the funeral because he was impeached, watches with wife Beth at home and a celebratory Catherine, who also skipped out on the event, serves up martinis at home with Marjorie and a grown-up little Richard as her clearly estranged mother is laid to rest.

But it was the characters who attended and who showed the most remorse that hit the hardest: Tom, who took a long pause at her casket, and Gary. Upon the sight of an aged Gary, Amy comments to Dan that Selina never visited him after turning him into the FBI. "You'd hate the flowers, but I brought the Dubonnet," he says while placing Selina's nomination lipstick on her casket in a heartbreaking moment.

Then comes the kicker: As Mike is preparing to offer his onscreen eulogy, Selina's death becomes old news when it's reported that Tom Hanks has died (a callback to the pilot). The iconic actor becomes the lead story as the world "mourns the loss of an American icon" — who isn't Selina.

"Obviously, I hope people laugh their asses off," Mandel had told The Hollywood Reporter of his hopes going into finale week. "I want them to feel that the ending is right, even if they don’t agree. Even if they don’t love every detail of it, I want them to admit that it’s right. (Laughs.) I was a fan of the show always and this was how I felt like it should end. I know I liked it and I know Julia liked it. So we’re pretty happy."

When speaking to THR about the final season, star and executive producer Louis-Dreyfus had said, "there’s a moment in the very end of the show where I think maybe, something crosses Selina’s eyes of perhaps remorse and love for Gary."

Adding, "Selina is comfortable with Gary, which is significant. And somewhat made uncomfortable by the fact that she’s comfortable with him, if that makes sense. And I think Gary’s just in love with Selina."

Mandel had said that all the pieces to Veep's final puzzle were hidden in the previous six episodes of the final season. And intricately threaded throughout the final run were indeed the steps that lead to the series finale's big reveal.

The central question going into the final season of Veep seemed to be whether or not Selina Meyer deserved to be president after everything she had sacrificed and, even more so, given all the horrible things that she has done. But then, after she plummeted to new morality lows that seemed all-too prescient to the real political climate, like rigging the election in her favor, or that would upend her own legacy — by offering to give back Tibet in exchange for a win — the bigger-picture question appeared to shift outward: Is Selina Meyer the president that viewers deserve?

As it turns out, the answer is yes and no — yes right now, but not in the future. In that sense, Veep's ending could be a hopeful one for America's path.

"The backend of the season is about the walls closing in," Mandel had said going into the final episodes. "Just in terms of, it’s getting closer, it’s getting closer. She wants it so badly but other things are affecting her. That’s what this season is about. The walls closing in. In all different ways. The walls of time, the walls of the campaign, the walls of some plot threads that get picked up from seasons past."

When coming out in full force for the final Veep season premiere, the consensus among the cast and writers seemed to be that the ending was one that Selina, certainly, and all the characters deserved.

"You have to have a good ending for everybody," executive producer Lew Morton explained to THR at the time. "The cast is so great and we love them all and want to make sure they get the ending they deserve — which, in most cases, is probably horrible. As America grew a little bit darker, we tried to keep up."

The most horrible of endings. of course, is reserved for Selina. Putting herself in Catherine's shoes, Sutherland — the actress behind one half of TV's most dysfunctional relationship — had added, "Catherine as the character thinks that Selina gets what she deserves in the end."

And though, in Gary's eyes, Selina is a forever queen, Hale shared his hope about what he'd like the end to represent: "Not to sound meta, but I’d like the legacy of Veep to not let this be someone’s legacy. Selina's focus is 'me, me, me' and selfishness, this is the result of that: a really sad human being. And I like putting that out there of being like, 'Hey, let this wake you up if that’s the direction that you’re going.'"

On a broader scale, Mandel offered up this hopeful wish, "If watching Veep inspires somebody to get off their ass and get involved, I’ll take that one person. I’ll be thrilled if that happens. It’s not the goal, but if it happens, I’ll be very happy."

Check back in for THR's series finale interview with showrunner David Mandel and see all Veep coverage here.