Anthony Weiner, the former New York congressman sentenced to 21 months behind bars after he sent explicit photos of himself to an underage girl, has been released from prison.

According to the Federal Bureau of Prisons, the 54-year-old Weiner is now in the custody of a New York residential reentry management office — also known as a halfway house. He's scheduled to be released on May 14.

Weiner pleaded guilty in 2017 to transferring obscene material to a minor. As NPR reported at the time, he was aware that the recipient was in high school.

"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," prosecutors wrote.

Weiner served the first part of his sentence at Federal Medical Center Devens, a men's prison in Massachusetts. His sentence was reduced by three months for good behavior, CNN reported.

Weiner will have to register as a sex offender for the rest of his life, The New York Times reports.

The Weiner case played a role in the 2016 presidential election. While investigating Weiner's alleged crimes, the FBI found 141,000 emails on Weiner's laptop it believed potentially relevant to the Clinton investigation. It resulted in the FBI decidingto re-open its investigation into Hillary Clinton weeks before the election, only to reverse its decision with just two days to go.

Clinton has blamedher loss in part on the FBI's decision to re-open that investigation.

This was not the first time Weiner had gotten into trouble for sending lewd messages. In 2011, while serving in Congress, he sent a salacious phototo a 21-year-old woman who was following him on Twitter. In 2013, under the alias " Carlos Danger," Weiner sent explicit photos to a 22-year-old woman.

Weiner was married to top Clinton aide Huma Abedin. The two separatedin 2016.

Copyright 2019 NPR. To see more, visit