A federal judge has sentenced disgraced former U.S. Rep. Anthony Weiner to 21 months in prison for sending obscene messages to a 15-year-old girl last year.The sexting case played a role in the 2016 presidential election. Weiner's wife, Huma Abedin, who has filed for divorce, was a top aide to Hillary Clinton.Weiner pleaded guilty in New York federal court in May to the felony charge over transmitting sexually explicit messages to the North Carolina teenager as part of a plea agreement. As The Associated Press reported, he said at the time: "I have a sickness, but I do not have an excuse."And as he heard U.S. District Judge Denise Cote pass sentence, Weiner "dropped his head into his hand and wept," the news service says, adding that the New York Democrat must "surrender to prison officials by Nov. 6."Prosecutors had sought a sentence of up to 27 months in prison, calling his conduct "very serious."Weiner was aware that the victim was a high school student, according to court documents, yet he continued to exchange increasing lewd messages with her."With full knowledge that he was communicating with a real 15-year-old girl, the defendant asked her to engage in sexually explicit conduct via Skype and Snapchat, where her body was on display, and where she was asked to sexually perform for him."NPR's Camila Domonoske has reported on Weiner's history of sexting scandals: