Former congressman Anthony Weiner is the center of attention in this documentary. (Sundance Selects)

Hubris, narcissism, tabloid spectacle and massive self-deception collide with the mesmerizing inevitability of a slow-motion train wreck in “Weiner,” an engrossing, almost shamefully entertaining documentary about former congressman Anthony Weiner and politics at its most sensationalist and superficial.

Do we really need to go over the fundamentals? After a promising career that began as New York’s youngest city council member, Weiner became a pugnacious, aggressively partisan rising star in Democratic politics until he resigned from the House of Representatives in 2011, after he was discovered to have sent lewd photographs to one of his Twitter followers. Two years later, on the day he announced his candidacy for mayor of New York, filmmakers Josh Kriegman and Elyse Steinberg caught up with Weiner as he embarked on what would either be a dashed quest for rehabilitation or a phoenix-like rebirth.

For a good portion of “Weiner,” it looks like the bold gambit will work for the candidate, who when the film opens is now the father of an adorable son and still married to longtime Hillary Clinton aide Huma Abedin. Blessed by Weiner and Abedin with exceptional access to campaign headquarters and the couple’s spacious Manhattan apartment, the filmmakers eavesdrop on strategy meetings with Weiner and his staffers, tag along to countless parades and press-the-flesh opportunities, and observe as a scrappy, happy warrior punches and charms his way back into the hearts of voters who, it’s clear, have come to love the guy for his chutzpah.

But all of that goodwill disappears when Weiner suffers yet another self-inflicted Himbo eruption, this time at the publicity-seeking hands of Sydney Leathers, a 23-year-old woman who reveals that she not only exchanged lewd texts with the candidate (who called himself “Carlos Danger” during the correspondence), but engaged in phone sex with him up to five times a day. On a thin, slightly soiled dime, “Weiner” pivots from the mother of all comeback stories to an alternately fascinating, mystifying and appalling portrait of the quest for power at its most obsessive and self-destructive.

The questions “Weiner” implicitly promises to answer all begin with “why,” starting with why on Earth a gifted leader would risk squandering his career with trivial interactions with opportunistic fans. Although “Weiner” is mostly a collection of moments caught on the fly during the campaign (skillfully edited by Eli B. Despres into a swift, funny, momentarily thriller-like narrative), Kriegman and Steinberg conducted one sit-down interview with Weiner himself. He winds up serving as his own Greek chorus, speculating at one point that the very characteristics that make him a natural politician — a gift for transactional relationships, a bottomless need for attention and approval — are what lead to his less functional, more compulsive behaviors in his personal life.

As for why the smart, talented, gorgeous Abedin continues to stand by her man, “Weiner” is less conclusive. Quiet and sphinx-like throughout most of the film, she emerges as a steely, self-possessed figure, as if every season of “The Good Wife” has been wrapped up in one woman, but with a more dazzling smile and a collection of daytime dresses to die for. Although she was the one who urged her husband to run for mayor and reluctantly allows herself to be used as a photo-op accessory and fundraising goad, when disaster hits, she makes the calculated decision to absent herself from the campaign, the only clues to her distress a pained look when Weiner gamely takes their son to the polls on election day, in need of a humanizing prop after she refuses to go along.

Weiner himself asks the third why, when he wonders aloud what possessed him to allow Kriegman and Steinberg to keep filming, even as the campaign goes disastrously south. (It bears noting that Kriegman once worked for Weiner, a fact that could and should have been made more transparent to viewers.) “Weiner” answers that question as it pulls the lens back to take in the media vortex that engulfed the protagonist and his family, judging, ridiculing and psychoanalyzing the candidate just as reflexively as he pursued his own sexual predilections.

Like the voters in New York, viewers ultimately must decide for themselves whether Weiner’s behavior was anyone’s business but his and his wife’s; whether his lying about it suggests deeper character flaws or was an understandable attempt at preserving privacy and his own political life; and whether the media and political culture have become hopelessly distorted by an addiction to scandal and surface values at the expense of serious policy discussions.

There’s a revealing moment early in the film, during a montage of outraged reactions to his candidacy, when Donald Trump appears in a video clip, shouting “No perverts!” at the suggestion of Weiner running for mayor. With Trump poised to dominate the rest of the year’s news cycle by any means possible, “Weiner” leaves the audience with the uneasy feeling that, when it comes to hubris, narcissism, spectacle and self-deception, we ain’t seen nothing, yet.

R. At Landmark’s E Street Cinema and Bethesda Row Cinema. Contains obscenity and some sexual material. 100 minutes.