Former congressman Anthony Weiner in 2017. (Timothy A. Clary/AFP/Getty Images)

Disgraced former congressman Anthony Weiner has been released from federal prison after being convicted of having illicit online contact with a 15-year-old girl in 2017.

The Federal Bureau of Prisons website shows that Weiner is currently in the custody of its Residential Reentry Management office in Brooklyn.

It’s not immediately clear when Weiner, 54, was transferred and where he’s staying now, but he will have to register as a sex offender and spend three years on supervised release under the terms of his sentence.

The prison bureau, federal prosecutors in New York and Weiner’s lawyer didn’t respond to emails seeking comment Sunday.

Weiner began serving a 21-month prison sentence at the Federal Medical Center Devens in Ayer, about 40 miles west of Boston, in November 2017.

The bureau website shows that Weiner is slated to complete his sentence May 14, a few months earlier than scheduled, because of good conduct.

A once-rising star in the Democratic Party who served nearly 12 years in Congress representing New York, Weiner had a dramatic and sordid fall from grace after he sent a lewd picture of himself to a college student over Twitter in 2011.

Weiner initially claimed that his account had been hacked, then admitted that he’d had inappropriate online interactions with at least six other women while married to Huma Abedin, a top aide to Hillary Clinton.

Weiner resigned from Congress that year but began a campaign for New York City mayor in 2013.

But his personal behavior was again his undoing after it was disclosed that he sent explicit photos under the alias “Carlos Danger” to at least one woman after resigning from Congress.

Weiner ultimately garnered less than 5 percent of the vote in the Democratic primary.

His final fall came in 2017 after prosecutors say he sent sexually explicit messages to a North Carolina high school student. Weiner pleaded guilty to transferring obscene material to a minor.

At his sentencing, he said he’d been a “very sick man for a very long time” because of his sex addiction.

Weiner’s attorney said the ex-lawmaker probably exchanged thousands of messages with hundreds of women over the years and was communicating with up to 19 women when he encountered the teenager.

Abedin filed for divorce from Weiner in 2017. But the two, who have a young son together, later agreed to discontinue the case to negotiate their separation privately.