NEW YORK (CNN) Former Rep. Anthony Weiner pleaded guilty Friday to transferring obscene material to a minor, according to the US Attorney's office for the Southern District of New York.
As part of the plea agreement, he will have to comply with the Sex Offender Registry and Notification Act.
"Today, former Congressman Anthony Weiner admitted and pled guilty to sending sexually explicit images and directions to engage in sexual conduct to a girl he knew to be 15 years old," acting US Attorney Joon H. Kim said in a statement. "Weiner's conduct was not only reprehensible, but a federal crime, one for which he is now convicted and will be sentenced."
Weiner, 52, was released on bail pending sentencing, which is scheduled for September 8, the release said.
David Schaefer, a spokesman for the law firm Covington & Burling, whose attorney, Arlo Devlin-Brown, is representing Weiner, said the former congressman's lawyer will comment later Friday.
CNN, citing law enforcement officials, reported last September that prosecutors in the office of then-US Attorney Preet Bharara issued a subpoena for Weiner's cell phone and other records as part of an investigation into alleged "sexting" with a purportedly underage girl.
The allegations first surfaced in the Daily Mail.
The online sexting relationship allegedly went on for months between Weiner and a girl claiming to be just 15. The Daily Mail reported she said he sent her numerous photos, one of him in a pool and at least one bare-chested.
The outlet reported that the girl said she reached out to Weiner last January on Twitter.
In a statement to CNN at the time, Weiner neither confirmed or denied sending the texts.
"I have repeatedly demonstrated terrible judgment about the people I have communicated with online and the things I have sent. I am filled with regret and heartbroken for those I have hurt," he said.
Weiner continued: "While I have provided the Daily Mail with information showing that I have likely been the subject of a hoax, I have no one to blame but me for putting myself in this position. I am sorry."
CNN was unable to confirm at the time that it was a hoax.
Weiner left Congress in June 2011 when sexually-charged, sometimes explicit, texts with women other than his wife first emerged. His social media habits continued after leaving Congress and contributed to his poor showing with his 2013 New York City mayoral campaign, a race in which he had once been a leading contender.
Weiner is estranged from Huma Abedin, a top aide to former Democratic presidential nominee Hillary Clinton. A message left with a representative for Abedin seeking comment Friday morning was not immediately returned.