Ex-congressman Anthony Weiner was sentenced to 21 months in prison Monday on federal charges of sending pornography and sexually explicit messages to a 15-year-old girl. “Transmitting obscenity to a minor to induce her to engage in sexually explicit conduct by video chat and photo — is far from mere ‘sexting,’” prosecutors implored the judge.

Weiner pleaded guilty to sending obscene material to a minor in May, with prosecutors recommending a sentence of 27 months in prison. The ex-congressman will also have to register as a sex offender.

Weiner, 53, resigned from Congress after tweeting an explicit photo from his account in 2011.

Two years later, sexting revelations derailed his mayoral bid in New York.

Weiner didn’t stop his reckless behavior even after encountering a high school student, and sexted with a Trump supporter while wife Huma Abedin was on the campaign trail with Hillary Clinton.