NEW YORK (WTVD) -- Disgraced former Congressman Anthony Weiner pleaded guilty Friday in New York to one count of transferring obscene material to a minor.
The FBI began investigating Weiner in September after a 15-year-old North Carolina girl told a tabloid news site that she and the disgraced former politician had exchanged lewd messages for several months.
She also accused him of asking her to undress on camera.
Weiner tearfully admitted to a federal judge he sent the material to the girl he knew to be 15. He agreed to serve 21-27 months in prison but will be released on a $150,000 bond before he is sentenced September 8.
Weiner, in an emotional and halting speech that required frequent pauses for water, said he yielded to "destructive impulses" and knew his conduct was "as morally wrong as it was unlawful."
Weiner's brother was the only family in court to watch the former congressman say he "hit bottom" and began therapy. "I have a sickness," he said "but I do not have an excuse."
Weiner agreed to surrender his iPhone as part of the plea agreement and he must register as a sex offender.
The investigation of his laptop led to the discovery of a cache of emails from Democratic presidential nominee Hillary Clinton to her aide Huma Abedin, Weiner's wife.
In October, just days before the election, FBI director James Comey stunned the country by announcing that his agency was reopening its closed investigation into Clinton's handling of State Department business on a private email server so it could analyze the newly discovered correspondence.
That inquiry was brief. Comey announced shortly before the election that the new emails contained nothing to change his view that Clinton could not be charged with a crime. But Clinton partly blamed her election loss to Republican Donald Trump on Comey's announcement.
The Associated Press and WABC-TV contributed to this report