A federal court in Manhattan sentenced disgraced former congressman and New York City mayoral candidate Anthony Weiner to 21 months in prison Monday, the resolution of a six-year saga of sexual impropriety broken by Breitbart News founder Andrew Breitbart.

U.S. District Judge Denise Cote arrived at the sentence after federal prosecutors asked for 27 months for Weiner’s single count of transferring obscene material to a minor. In May, Weiner pleaded guilty to “sexting” with a 15-year old girl, the last in a long line of online acquaintances with whom Weiner engaged in explicit exchanges.

The former congressman’s propensity for lewd behavior online, which came to destroy his political career and marriage, and, according to the Associated Press, “may have cost Hillary Clinton’s [sic] the presidency,” first came to the public’s attention through Andrew Breitbart’s nascent independent media empire. Breitbart News stablemates Big Government and Big Journalism spread the fact that Weiner had, apparently accidentally, tweeted a picture of himself in an aroused state. This touched off what came to be known as “Weinergate” and eventually led to the then-Democratic congressman resigning.

After Weiner impugned Andrew Breitbart’s reputation and journalistic integrity, Breitbart famously hijacked a New York City press conference Weiner was giving to address the growing scandal. Breitbart defended his reporting and challenged the journalists in the room to name a single lie he and his team had told. Weiner himself eventually apologized to Andrew Breitbart for his claim that he was hacked and his attempt to damage Breitbart’s reputation.

The depths of Weiner’s perversions proved to be even more salacious than Breitbart’s initial reporting suggested. After the first sexting scandal, his resignation, widespread public ridicule, and a never-ending series of pun-based tabloid headlines, it emerged that Weiner continued sexting with a number of women online, including a 22-year-old Indiana college student named Sydney Leathers.

These new revelations sunk any chance he had of returning to politics as mayor of New York City in 2013 but did not stop his habit, as yet another sexting scandal proved. Photos he sent women eventually came to include his young son.

When one of Weiner’s partners, whom he asked to perform sexual acts and displays for him over webcam, proved to be only 15 years old, the matter became a criminal one, leading to a renewed scandal that, given his wife, Huma Abedin’s, leading role in the Hillary Clinton presidential campaign, cast yet more suspicion on the candidate’s private email server.

The Associated Press’s reporting on Weiner’s sentencing focuses heavily on Weiner’s supposed role in Clinton’s shocking November 2016 election defeat. As the AP puts it, “It also became an issue in the closing days of the 2016 presidential election when then-FBI Director James Comey cited emails discovered on a laptop used by Weiner to justify reopening the earlier probe of Clinton’s private computer server.”

Weiner will begin serving his sentence on November 6.