He surrendered to FBI agents in New York early Friday and appeared in court late-morning, telling U.S. District Judge Loretta Preska how he had communicated with the teenager, "as I had done and continued to do with adult women," according to his plea statement, which was released by his attorney. "I knew this was as morally wrong as it was unlawful."
Weiner, a Democrat who represented a New York City congressional district for more than a decade, resigned in 2011 amid a firestorm over an explicit photo he accidentally sent from his Twitter account. Weiner later admitted that he had exchanged explicit messages and photos with at least six other women.
Weiner said in court Friday that he has "compulsively sought attention" from women who have reached out to him on social media and that he has engaged some of them in sexual conversations.
"These destructive impulses brought great devastation to family and friends, and destroyed my life's dream of public service," he said in his plea statement. "And yet I remained in denial even as the world around me fell apart."
Following the incident with the 15-year-old girl, Weiner said, "I came to grips for the first time with the depths of my sickness" and started mental health treatment.
Weiner teared up as he made his statement, The Associated Press reported.
After Weiner pleaded guilty in the case, his attorney, Arlo Devlin-Brown, said his client has accepted "full responsibility for the inappropriate, sexually explicit communications he engaged in early last year."
"He apologized, offered no excuses, and made a commitment to make amends," Devlin-Brown said in a statement.
The criminal charge — transferring obscenity to a minor — carries a maximum penalty of 10 years in prison, according to federal authorities. Under the plea deal, Weiner agreed to register as a sex offender and not to appeal a sentence between 21 and 27 months in prison. His sentencing hearing is set for Sept. 8.
"Weiner's conduct was not only reprehensible, but a federal crime, one for which he is now convicted and will be sentenced," Acting Manhattan U.S. Attorney Joon H. Kim said in a statement.
The case came to the attention of the FBI last year when the 15-year-old girl in North Carolina told the Daily Mail about her online communications with Weiner. The story claimed, "Anthony Weiner carried on a months-long online sexual relationship with a troubled 15-year-old girl telling her she made him 'hard,' asking her to dress up in 'school-girl' outfits and pressing her to engage in 'rape fantasies.'"
During a federal investigation, agents seized a laptop that Weiner had shared with his estranged wife, Huma Abedin, who was a top Hillary Clinton aide. On the laptop, agents discovered numerous emails that Clinton had sent to Abedin, prompting an announcement from then-FBI Director James Comey in the days leading up to the presidential election that the agency was reopening its investigation into Clinton's emails.
Comey then announced that no charges would be brought in the case. But Clinton, and others, have said the scandal was partly the reason she lost the presidential election to Donald Trump.