US representative Anthony Weiner quit Congress on Thursday, apologizing for the scandal over his lewd online exchanges with women that led to a political uproar.
Before a crush of news cameras in New York, the 46-year-old congressman who was until recently seen as a leading candidate for mayor of New York city sounded a note of remorse "for the personal mistakes I have made and the embarrassment I have caused."
"I hoped to be able to continue the work that the citizens of my district elected me to do, to fight for the middle class and those struggling to make it," he said.
"Unfortunately, the distraction that I have created has made that impossible, so today I'm announcing my resignation from Congress."
The announcement was greeted with relief on Capitol Hill, where the lawmaker had faced a flurry of calls from within his own Democratic Party to resign after lying about online communications with women in which he sent several lewd photos, including one of his own crotch.
"It's difficult to watch the self-destruction of a friend, and to witness the breaking of hearts over what can only be categorized as reprehensible behavior and bad judgment," House Democratic Caucus chairman John Larson said in a pointed message released shortly after Weiner quit.
"I hope that he will get the help he needs and that together they will work their way through this," Larson said.
House democratic leader Nancy Pelosi, who had said Weiner "exercised poor judgment in his actions, said: "Today, he made the right judgment in resigning."
Steve Israel, chairman of the democratic congressional campaign committee, said his friend was focused on getting his family life in order in the aftermath of the extraordinarily embarrassing scandal that played out with near-constant tabloid and cable news coverage.
"I can tell you absolutely firsthand that the only kind of recovery that Anthony Weiner is concerned about, based on the conversations that I've had with him, is not a political recovery, it's personal - personal recovery with his wife and baby they are expecting," Israel told CNN.
He would have a tough political road ahead of him, and the point was hammered home during Weiner's four-minute announcement when a heckler yelled "Bye bye pervert."
Democrats had become increasingly worried that the scandal could hurt the party's image, just one year before pivotal congressional and presidential elections.
President Barack Obama, speaking to ABC television in an interview to air Friday, said he wished Weiner and his wife well.
"Obviously, it's been a tough incident for him, but I'm confident that they'll refocus and he'll refocus, and they'll end up being able to bounce back," Obama said.
New York mayor Michael Bloomberg said that the apparent outcome of the scandal was lamentable but perhaps inevitable.
"You cannot let it go on and on because it's a diversion away from the important things that this country has to deal with," Bloomberg said.
After lying about his X-rated Internet liaisons for days, insisting that hackers had infiltrated his Twitter account, Weiner called a nationally televised press conference earlier in June and made a tearful admission.
The Democratic leadership in Congress urged him to quit, but Weiner, who is married to Huma Abedin, a top aide to US secretary of state Hillary Clinton, had appeared determined to stay, announcing at the weekend that he was undergoing "therapy."
His chances for survival diminished however after Obama essentially urged him to quit.
"I can tell you that if that was me, I would resign," Obama told NBC's "Today" show on Tuesday.
The decision ends a prolonged saga that began Memorial Day weekend when Weiner inadvertently posted a lewd photo to his Twitter feed that was intended to be shared privately.
Later, Weiner held a stunning press conference at which he admitted to inappropriate online communications for years with at least six women online.
A special election in the district will now have to be called by New York's Democratic Governor Andrew Cuomo within 30 to 40 days.