Ex-New York congressman Anthony Weiner burst into tears as he was sentenced to 21 months in jail for sending sexually explicit messages to an underage girl.
He pleaded guilty in May to transferring obscene material to a minor and agreed not to appeal against a prison sentence of 27 months or less.
Weiner, 53, quit Congress in 2011 over a sex scandal and was again exposed in his 2013 run for New York mayor.
His lawyers had asked a US District Judge for probation instead of jail.
But in sentencing Weiner, Judge Cote said: “This is a serious crime that deserves serious punishment.”
“Anthony Weiner, a former Congressman and candidate for Mayor, asked a girl who he knew to be 15 years old to display her naked body and engage in sexually explicit behaviour for him online,” Acting Manhattan US Attorney Joon H Kim said in a statement on Monday.
“Justice demands that this type of conduct be prosecuted and punished with time in prison.”
In addition to jail time, Weiner was sentenced to three years of supervised release, according to a statement from the US Attorney’s Office.
Weiner’s attorneys contended the former politician had acted out of the “depths of an uncontrolled sickness” and was now seeking treatment.
In a letter to US District Judge Denise Cote, Weiner said he felt “profound” regret for his crimes and his “continued acting out over years crushed the aspirations” of his wife, Huma Abedin, and ruined their marriage.
Ms Abedin filed for divorce on the same day her husband was found guilty in May