Convicted ex-congressman Anthony Weiner has been sprung from prison — and is now part of a federal re-entry program in New York, records show.

Weiner has been transferred from Federal Medical Center in Devens, Mass. where he served a bulk of his 21-month sentence for sexting a 15-year-old girl from North Carolina, according to Federal Bureau of Prisons records.

The 54-year-old is now being supervised by the federal Residential Reentry Management, which has a field office in Sunset Park and operates multiples facilities, the records say.

He is either in a halfway house or in home confinement, TMZ reported. It’s not clear when the transfer took place.

Weiner is set to be released from federal custody on May 14, thanks to good conduct behind bars that shaved about three months off his sentence.

He’ll spend three years on supervised release and will have to pay a $10,000 fine as well as register as a sex offender.

The once-rising Democrat flamed out amid a series of sexting scandals that first began in 2011, when he resigned from Congress after admitting to sending an X-rated photo and engaging in inappropriate relationships with women online.

Two years later, his comeback bid to become New York City’s mayor was torpedoed by revelations he sexted with another woman under the pseudonym “Carlos Danger.”

The pol’s lewd behavior took a more disturbing turn, however, when he was busted in 2017 for sexting with a high school girl — despite knowing she was underage.

Weiner wept at his sentencing, calling himself a “very sick man.”

Huma Abedin, his wife and mother of their young son, filed for divorce just hours after he pleaded guilty but she later withdrew the case to settle matters out of court.