FILE PHOTO - Former U.S. Congressman Anthony Weiner departs U.S. Federal Court, following his sentencing after pleading guilty to one count of sending obscene messages to a minor, ending an investigation into a "sexting" scandal that played a role in last year's U.S. presidential election, in New York, U.S., September 25, 2017. REUTERS/Lucas Jackson

(Reuters) - Anthony Weiner, the disgraced former congressman who helped play a role in Hillary Clinton’s defeat in the 2016 U.S. presidential election, has been released from federal prison after serving about 14 months for exchanging sexually explicit texts with a 15-year-old girl.

Weiner, 54, has been released from the Federal Medical Center in Devens, Massachusetts, and is under the supervision of a residential re-entry management office in Brooklyn, according to prison records.

The seven-term congressman who ran unsuccessfully several times for New York City mayor will be free on May 14, records show, about three months earlier than his 21-month sentence. He had pleaded guilty to sending the texts and had faced up to 10 years in prison.

The FBI discovered a trove of emails belonging to his then-wife, Huma Abedin, a senior aide to Hillary Clinton, on Weiner’s laptop. Then-FBI Director James Comey announced just weeks before the presidential election that his agency was reopening an investigation into Clinton’s use of a private email server while she was U.S. secretary of state.

Clinton said the move contributed to her stunning loss to Republican Donald Trump.

Abedin filed for divorce. The couple has a 7-year-old son, Jordan.