Anthony Weiner wept in court on Friday while begging for forgiveness as he entered a plea of guilty to a single charge of transferring obscene material to a minor.

'I have a sickness, but I do not have an excuse,' Weiner told the court, while agreeing to accept any prison sentence of less than 27 months and register as a sex offender.

He was also forced to forfeit his iPhone and any other cellular devices in court on Friday, where his brother Jason was the lone family member in attendance.

Weiner's day in court came eight months after DailyMail.com revealed that the disgraced Congressman had been exchanging sexually-charged messages and explicit photos with a 15-year-old high school student in North Carolina.

The exchanges began in January of last year after the teenager reached out to Weiner on Twitter, and continued through late spring.

Weiner was 51 and still married to Huma Abedin when he sent the texts and images to the minor female, during a time when his primary responsibility was the care of his son Jordan, now 5, while Abedin was on the campaign trail with Hillary Clinton.

Abedin did not appear in court on Friday, but was involved in her own legal proceeding as she officially filed for divorce from Weiner.

It was the FBI's investigation into Weiner's inappropriate sexting that led to the discovery of classified emails forwarded by Huma to his computer - and the decision by FBI director James Comey to reopen the investigation into Clinton.

Prosecutors are recommending that Weiner serve a two-year sentence as part of the deal, with the charge carrying a maximum prison term of 10 years and maximum fine of $250,000.

He was released on bail and will be sentenced on September 8, four days after his 53rd birthday.

Scroll down for video

Facing the cameras: Anthony Weiner wept in court as he plead guilty to a single charge of transferring obscene material to a minor in federal court on Friday (above leaving court)

Page him: He was also forced to forfeit his iPhone and any other cellular devices as part of his plea deal

Helping hand: Weiner was consoled by his attorney (illustration above) as he broke down while reading from his prepared statement in front of the court

Gaunt: The former Congressman and the US attorney's office finalized the plea deal this week, and Weiner said he would not appeal a sentence of less than 27 months

Emerging from the shadows: Weiner agreed to register as a sex offender during the proceedings on Friday

Weiner was pictured wearing his wedding ring despite his estranged wife announcing the couple's separation in August of last year

Victim: DailyMail.com revealed in September that Weiner had been exchanging sexually explicit photos and texts with a 15-year-old high school student in North Carolina (above)

Weiner appeared strained from the moment he entered courtroom on Friday, looking alarmingly gaunt and surprising many by showing off his wedding band despite Abedin announcing the couple had separated last August.

He spoke briefly with his counsel before signing off on paperwork admitting to his guilt ahead of the proceedings, and then sat back and waited for the hearing to get underway.

Weiner struggled to smile at one point as he awaited the arrival of Judge Preska, who quickly moved things along after calling the court to order on Friday.

He calmly answered the Judge Loretta Preska's inquiries after entering his plea and stated that he understood the charges and the implications of his plea.

When instructed to tell the court what he had done, Weiner, dressed in a burgundy Gucci tie and navy blue suit, asked to read a prepared written statement.

He then began to break down in tears, having until that point remained composed and seemingly calm in court.

Weiner struggled to speak at first when delivering his statement, with his attorney Arlo Devlin Brown placed a reassuring hand on his back while Judge Preska told him to 'take his time.'

He began by stating: 'Through approximately March 2016, 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.

'I knew this was as morally wrong as it was unlawful.'

Weiner went on to acknowledge the 'devastating consequences' that these indiscretions had brought upon both his public and private lives, managing to end his political career and his marriage.

It was at this point that Weiner's voice dried up and he was forced to take a sip from his water bottle.

He continued by admitting that even then he did not stop his conduct or try and change his ways, 'even as my world fell apart around me.'

Here's Tony: Weiner was chauffeured back to his New York City apartment after his appearance on Friday (above exiting car)

Summer break: Weiner will be back in court in September to be sentenced in the case

Brother's keeper: Weiner's brother Jason (above) was the lone family member who appeared at court on Friday

Weiner stated that he had engaged in communications with the teen starting in 2016 even though he know it was 'morally wrong and unlawful.'

He went on to sat that he then 'hit bottom' late last year and made a 'moral inventory' of his crimes so that he could attempt to make amends.

Weiner also stated that he was in regular therapy.

'I apologize for everyone I have hurt and to the teenage girl I have hurt so badly,' said Weiner while struggling to maintain his composure and wiping tears from his eyes.

The father of the young victim spoke with DailyMail.com after learning that Weiner would be entering a guilty plea, saying: 'I don't know if it's justice. I don't know what the sentence is gonna be. I would like to see, is [the sentence] fair or not fair? Just because he's pleading guilty doesn't mean he's going to do a bit of time.'

Acting Manhattan U.S. Attorney Joon H. Kim said in a statement after the hearing: '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.

'Weiner’s conduct was not only reprehensible, but a federal crime, one for which he is now convicted and will be sentenced. We thank the FBI and the NYPD for their work in this investigation.'

FBI Assistant Director in Charge William F. Sweeney Jr. also chimed in, saying: 'We work every day in the FBI and law enforcement to stop adults from preying on vulnerable children.

'Our partnership with the NYPD cannot be stressed enough in this case, and we would like to thank the Special Victims Unit for all the work and effort they put into this investigation.'

Weiner's brother Jason refused to comment on the proceedings when approached by DailyMail.com outside the courtroom.

Outreach: Weiner confessed to having 'compulsively sought' the company of women online for both 'sexual and non-sexual communication'

Coming clean: Weiner admitted that he had engaged in communications with the teen starting in 2016

Off he goes: 'I apologize for everyone I have hurt and to the teenage girl I have hurt so badly,' said Weiner in court

Picking up the pieces: Weiner acknowledged the 'devastating consequences' that these indiscretions had brought upon both his public and private lives, managing to end his political career and his marriage

Private details: In texts obtained by DailyMail.com, Weiner complained to the girl that he rarely had sex with Abedin

Not sold: The father of the young victim spoke with DailyMail.com after learning that Weiner would be entering a guilty plea, saying: 'I don't know if it's justice'

The disclosure of Weiner's exchanges with the minor female led to an FBI probe back in September, and in late October it was revealed that the same probe had also uncovered possible evidence of Abedin forwarding classified emails to her husband's personal laptop computer.

That discovery was later revealed in a very public manner by former FBI Director James Comey a little over a week before the election.

Clinton would later state that she believed the timing of the incident played a role in her loss to Donald Trump.

The victim - whose name was withheld because of her age - told DailyMail.com that the sexting began while she was a sophomore in high school.

In texts obtained by DailyMail.com, Weiner complained to the girl that he rarely had sex with Abedin while also lamenting the fact that he was tasked with caring for the couple's son.

He also referred to himself as 'T Dog.'

Weiner was aware that the girl was underage, according to DailyMail.com interviews with the victim and her father, as well as a cache of online messages.

Weiner sent bare-chested photos of himself to the underage girl, repeatedly called her 'baby' and complimented her body, and told her that he woke up 'hard' after thinking about her, according to copies of the conversations.

In one particularly lewd message, he told the teen: 'I would bust that tight p***y so hard and so often that you would leak and limp for a week.'

When confronted with the claims, Weiner did not deny exchanging 'flirtatious' messages with the teen.

He declined however to comment on the specifics of the allegations on the record, but provided copies of two emails the girl sent him that he contends raised questions about her claims.

Weiner also gave a statement to DailyMail.com, saying at one point: 'I have repeatedly demonstrated terrible judgement 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.'

WEINER PLEA ALLOCUTION 'Beginning with my service in Congress and continuing into the first half of last year, I have compulsively sought attention from women who contacted me on social media, and I engaged with many of them in both sexual and non-sexual conversation. These destructive impulses brought great devastation to family and friends, and destroyed my life's dream of public service. And yet I remained in denial even as the world around me fell apart. 'In late January 2016, I was contacted and began exchanging online messages with a stranger who said she was a high school student and who I understood to be 15 years old. Through approximately March 2016, 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. I knew this was as morally wrong as it was unlawful. 'This fall, I came to grips for the first time with the depths of my sickness. I had hit bottom. I entered intensive treatment, found the courage to take a moral inventory of my defects, and began a program of recovery and mental health treatment that I continue to follow everyday. 'I accept full responsibility for my conduct. I have a sickness, but I do not have an excuse. I apologize to everyone I have hurt. I apologize to the teenage girl, whom I mistreated so badly. I am committed to making amends to all those I have harmed. Thank you. ' Advertisement

Evidence: Weiner is now facing up to 10 years in prison, and will likely have to register as a sex offender (text exchanges above)

Warped view: When confronted with the claims, Weiner did not deny exchanging 'flirtatious' messages with the teen

DailyMail.com reached out to the 15-year-old girl's family after receiving information about her relationship with Weiner.

The young victim said that she did not want to press charges against the former congressman because she thought their relationship was consensual.

Her father meanwhile said that he chose to go public with the story out of concern that Weiner might be texting other minor females.

Weiner previously admitted back in 2011 to sending five private Twitter messages to a 17-year-old girl during his first sexting scandal, but said the messages 'were neither explicit nor indecent.'

Through interviews and a collection of online messages from applications such as Twitter, Facebook, Kik, and Confide, DailyMail.com was able to piece together a timeline of Weiner's relationship with the underage girl.

The girl first reached out to Weiner on the evening of January 23, 2016, when she noticed his Twitter page allowed non-followers to contact him through direct private messages.

She told DailyMail.com she was interested in politics and had heard about his sexting scandals, and was curious to see what he was like.

It was clear from the messages that she was encouraging Weiner to engage with her in a sexual manner. She told DailyMail.com she didn't consider Weiner her boyfriend, but thought the relationship was a 'romantic' one.

She acknowledged during interviews that she had developed an obsession with Weiner, and sought him out on Twitter in January while trying to write a book about him. She said she continued to write the book as their relationship developed.

'Why did I message you [in January]?' the girl wrote in an email to Weiner last week. 'I was studying you- for a book of course. You were my Hannibal Lecter.

'I wanted to know what made you tick. As we chatted, I pretended to not know EVERYTHING about you. I didn't want to appear suspicious.'

She also told Weiner: 'I was obsessed with you.'

Weiner quickly messaged her back, and they struck up a conversation. Over time, their exchanges became increasingly intimate, with Weiner making sexual innuendos and sending photos of himself in various states of undress.

Soon after the young victim spoke publicly about her online relationship with Weiner he checked himself into The Ranch, a rehab center in Tennessee where he stayed for more than a month in a bid to cure himself of his sex addiction.

First time around: Abedin and Weiner enter their home in Queens on June 16, 2011 just before he announced his resignation from Congress in the wake of his first sexting scandal

Deja vu: Abedin stood by her husband's side after the second scandal broke as a news conference on July 23, 2013 (above), with Weiner opting to stay in the race for NYC mayor

Heated Huma: Abedin was photographed storming out of a Hamptons fundraiser for Clinton in August moments after learning about her husband's third scandal

Seasoned pro: Abedin popped on some shades and flashed her Hillary tote in her first appearance after Weiner's fourth sexting scandal , with her disgraced husband seen scurrying off behind his estranged wife on September 21, 2016 (above)

The fourth sexting scandal came just one month after Abedin announced she was ending the marriage, a decision that came hot on the heels of a New York Post story revealing that Weiner had sexted yet another lewd picture of himself to a woman.

That photo showed Weiner lying in bed wearing nothing but his boxer briefs while his young son, who was 4 at the time, lay sleeping next to him.

'Someone just climbed into my bed,' Weiner wrote to the woman before sending the photo, which clearly showed the outline of his manhood.

She responded by writing back: 'You do realize you can see you[r] Weiner in that pic??'

The photo was sent shortly after 3am on July 31, 2015 by Weiner.

In the accompanying text exchange, Weiner also discussed the massage parlors near his old apartment while making frequent references to the largesse of his manhood.

'Id put someone's eye out with this thing. #Overdue,' wrote Weiner at one point.

In other texts sent to the woman, a brunette divorcee, Weiner spoke about being 'horny as f***' and sent a variety of emojis that were sexual in nature.

Weiner also reportedly admitted to masturbating while thinking about the woman in a text, calling her a 'fantasy chick.'

One month later, things got even worse, landing the once shining star and perceived presidential hopeful in court and possibly prison.

The Democratic congressman served seven terms in the House of Representatives for the state of New York before stepping down in June 2011 in the wake of his first sexting scandal.

He then made the decision to run for mayor of New York City, and found himself an unlikely frontrunner in the race, until it was revealed that he had once again been exchanging lewd messages, this time with a woman named Sydney Leathers.

It was that second scandal which also revealed Weiner's nom de plume when sending lewd messages and images over the Internet - Carlos Danger.

The scandal destroyed Weiner's chances in the mayoral race and took an even bigger toll on his marriage, especially since Abedin had agreed to help work on her husband's campaign and share with him her invaluable Rolodex of big-money donors which she obtained over the course of two decades with the Clintons.

That entire campaign, from humble start and soaring high to epic fall from grace, was captured by a documentary film crew who had been following him during the campaign and granted complete access to the politician before the scandal broke.

'Weiner' was released last year to critical accolades, while the subject himself has remained mostly out-of-work since that time.

Abedin is also navigating a new job frontier after landing back in New York City and not Washington DC after the election.

Weiner and Abedin married in July 2010 in a ceremony that was officiated by Bill Clinton and covered in the pages of Vogue, with Abedin getting pregnant with the couple's first child just a few months later.

The couple was not even a year into their marriage when news broke that Weiner had been sexting women online after he tweeted out a photo of his erect penis that he had meant to privately send to a woman on the social media site.

He resigned from Congress and in December of that year Abedin gave birth to Jordan.

In the wake of the second sexting scandal, things seemed to be on an upswing for the couple, with Abedin poised to become the White House Chief of Staff and Weiner playing the doting stay-at-home dad.

Once powerful political players: Weiner and Abedin married in July 2010 in a ceremony that was officiated by Bill Clinton

Squad: Abedin left Weiner in charge of child care for most of the past three years while she was on the campaign trail with Clinton

Daddy day care: 'Someone just climbed into my bed,' Weiner wrote to his adult pen pal before sending the above photo, which clearly showed the outline of his manhood

The eternally reserved Abedin even spoke about the couple's relationship in an interview on the Call Your Girlfriend podcast early last year, saying: 'You know, I think that a marriage really only works in any situation, whether you're in politics or not, if one partner is fully supportive of the other.

'I think it's a little – it's often a little more challenging when you're in politics because your private life, and I think everybody craves their own privacy, and so I think your private life is displayed to the world in a way that you otherwise wouldn't have to deal with if one spouse is a private person and the other person's in politics as was the case certainly in my marriage.

'But I think it works if you fully support each other.'

She then noted that her husband had taken over much of the parenting of their son as she was away from home.

'I'm on the road a lot on the campaign. As I mentioned earlier I have a four-year-old son and I don't think I could do this if I didn't have the support of a spouse who is willing to basically be a stay-at- home dad as much as he possibly can so I'm able to be on the road,' said Abedin.

'I miss my son but I don't worry about him because I know between this little village we've created between Anthony and my in-laws and my mom and our families and this wonderful woman who we have helping us I can go out and be the best professional woman that I can be because I have that support.'

Just a few months later the photo of Weiner in bed with the couple's son was published, ending the couple's marriage.

'After long and painful consideration and work on my marriage, I have made the decision to separate from my husband,' said Abedin in a statement.

'Anthony and I remain devoted to doing what is best for our son, who is the light of our life. During this difficult time, I ask for respect for our privacy.'

Abedin also found herself surrounded by cameras when that scandal erupted, with photos showing the aide fleeing a fundraiser in the Hamptons after learning that the story would be running online and on the cover of the Post the next morning.