It's hard time for Anthony Weiner.
The disgraced ex-congressman broke down crying as he was sentenced to 21 months in prison Monday for convincing a high school student to undress and touch herself via Skype in 2016.
"This was a serious crime. It's a serious crime that deserves serious punishment," Manhattan federal judge Denise Cote said as the convicted sext fiend dropped his head into his hand and wept.
After the courtroom cleared, the one-time mayoral hopeful sat crying silently in his chair alongside his tearful mother.
His father and brother also joined him in the courtroom — but the serial sexter's soon-to-be-ex-wife Huma Abedin was nowhere to be seen.
In addition to his prison stint, Weiner was also sentenced to pay a $10,000 fine for his crime, participate in sex offender outpatient treatment program and spend three years on supervised release once his sentence is up.
He will have to surrender to his designated facility by Nov. 6 — his lawyer put in a request for Schuylkill Federal Correctional Facilit in Pennsylvania, or another low-security prison near New York.
Weiner, 53, had faced as much as 10 years in the slammer after pleading guilty in May to one count of transferring obscene material to a minor. The feds said Weiner, a former congressman from Brooklyn, began a two-month sexting session with the North Carolina teen shortly after she messaged him on Twitter in January 2016.
He made a tearful last-minute plea for probation so he can continue his treatment, which includes sessions with Sex Addicts Anonymous.
"If I fail, I know what will happen," Weiner said. "But with God's grace I will not."
He argued that his online dalliance with the 15-year-old was due to his sick obsession with sexting strangers and addiction — rather than an obsession with underage girls — and claimed he had hit "rock bottom" and is now in recovery.