Former Rep. Anthony Weiner (D-N.Y.) on Friday pleaded guilty to sending obscene material to an underage girl.

“I have a sickness, but I do not have an excuse,” he said, according to The New York Daily News.

“I apologize to everyone I have hurt,” Weiner added in his admission to the court. “I apologize to the teenage girl, whom I mistreated so badly.”

The Daily News reported that Weiner cried as he read a four-paragraph statement at the Manhattan Federal Courthouse.

ADVERTISEMENT

Prosecutors said they would ask for 21 months to 27 months in prison for Weiner once his plea is entered. He will also be required to register as a sex offender.

Court documents indicated the plea deal was finalized on May 10, according to the Daily News.

Weiner, 52, was facing a single charge of transmitting obscene material to a minor. The charge carried a potential 10-year prison term.

“I knew this was as morally wrong as it was unlawful,” said Weiner, whose sentencing is scheduled for Sept. 8.

“I engaged in obscene communications with this teenager, including sharing explicit images and encouraging her to engage in sexually explicit conduct, just as I had done and continued to do with adult women.”

Investigators say Weiner, then 51, began exchanging illicit text messages with a 15-year-old girl in North Carolina in January 2016. Weiner’s plea indicated the conducted occurred from that January and March.

The investigation into Weiner has been blamed in part for Hillary Clinton Hillary Diane Rodham ClintonHillicon Valley: FBI chief says Russia is trying to interfere in election to undermine Biden | Treasury Dept. sanctions Iranian government-backed hackers The Hill's Campaign Report: Arizona shifts towards Biden | Biden prepares for drive-in town hall | New Biden ad targets Latino voters FBI chief says Russia is trying to interfere in election to undermine Biden MORE’s loss in the 2016 presidential election to President Trump. The FBI announced in October it was renewing its investigation into Clinton's handling of classified material after Clinton emails were found on Weiner's laptop in the course of a separate investigation.

Weiner is married to Huma Abedin, a longtime aide to Clinton.