Disgraced former Congressman Anthony Weiner has been ordered to register as a sex offender as he nears the end of a 21-month prison sentence for having illicit online contact with a 15-year-old girl.

A New York City judge on Friday designated Weiner a Level 1 sex offender, meaning he’s thought to have a low risk of reoffending.

Weiner must register for a minimum of 20 years. He’s required to verify his address every year and visit a police station every three years to have a new picture taken.

Weiner didn’t attend Friday’s court hearing. He’s in a halfway house after serving most of his sentence at a prison in Massachusetts.

ANTHONY WEINER RELEASED FROM PRISON AS PART OF FEDERAL RE-ENTRY PROGRAM

He’s due to be released May 14.

Before being sentenced, the Democrat said he’d been a “very sick man.”

Weiner was released from prison in February and entered the federal re-entry program in New York as he awaits his full release.

He was transferred from Federal Medical Center in Massachusetts into the care of New York’s Residential Re-entry Management program.

FLASHBACK: ANTHONY WEINER SENTENCED TO 21 MONTHS IN PRISON IN TEEN SEXTING CASE

While a staff member at New York’s RRM in Brooklyn’s Sunset Park neighborhood was unable to provide Fox News with Weiner’s exact whereabouts, it is believed that he is serving the remaining time of his sentence in a halfway house or in home confinement before his official release on May 14.

Good conduct while in prison has shaved off about three months from his sentence. He will spend three years on supervised release and will have to pay a $10,000 fine.

CLICK HERE TO GET THE FOX NEWS APP

Once a prominent star in the Democratic Party, Weiner’s political career began to unravel in 2011 when he resigned from Congress after admitting to sending an X-rated photo and engaging in inappropriate relationships with women online. While he attempted a comeback in 2013 when he ran for New York City mayor, that campaign went off the tracks when it was revealed that he had sexted with another woman under the pseudonym “Carlos Danger.”

Fox News' Andrew O'Reilly contributed to this report.