Scandal-scarred Rep. Anthony Weiner resigned his seat from the U.S. House on Thursday, but his departing speech left the door open for a comeback.

Weiner has faced calls to resign for more than a week, since he came clean after publicly lied about inappropriate communications with women he met online. His resignation speech centered more on his years of service than his sexually-charged online affairs, as the outgoing congressman struck a down-but-not-out tone.

"I have never forgotten my neighbors, because they represent the same middle class story as mine," Weiner said in opening remarks that sounded more like a candidate on the campaign trail than a defeated ex-lawmaker. "I went to public schools my whole life. My mother was a school teacher for 32 years. My father went to law school on a GI bill. The middle class story of New York is my story, and I'm very proud of that."

But when Weiner finally announced his decision to resign, the statement was met by cheers and heckling from some in the packed room at a Brooklyn senior center. From then on, he battled to finish his brief statement, and he took no questions from reporters.

The seven-term Democrat said he was taking time out to redirect his energy offline.

More On This...

"Today I am announcing my resignation from Congress, so my colleagues can get back to work, my neighbors can choose a new representative and most importantly that my wife and I can continue to deal with the damage I have caused," Weiner said. He had announced over the weekend that he was going to take two weeks of leave from Congress so he could get unspecified "treatment."

It was an ugly scandal from the start, three weeks ago, when Weiner accidentally distributed a photo of his private parts on his public Twitter account, then denied he had anything to do with it. His departure announcement was just as ugly. Weiner was repeatedly interrupted during his remarks by a heckler who made it difficult for the outgoing congressman to finish all of his sentences. The heckler was Benjy Bronk, a performer from shock jock Howard Stern's show.

Nonetheless, Weiner said he hadn't given up on the motives that got him into public service.

"I got into politics to help give voice to the many who simply didn't have one," he said. "Now I'll be looking for other ways to contribute my talents to make sure that we live up to that most New York and American of ideals. The idea that loving a family, a community and ultimately a country is the one thing that all unites us. The one thing that we're all focused on."

Weiner now joins a long list of U.S. lawmakers who have resigned over sex scandals in recent years, including New York Reps. Chris Lee, a Republican, and Eric Massa, a Democrat; and Sen. John Ensign, R-Nev.

If Weiner doesn't try to revive his political career, he could try to follow in the footsteps of former New York Gov. Eliot Spitzer, who reinvented himself as a media commentator after he resigned in 2008 over a prostitution scandal. Spitzer is now the host of a CNN prime-time show.

Weiner admitted to sending lewd pictures and messages to at least six women on Twitter and Facebook over a three-year period. Weiner spent the first week falsely and boldly claiming that a photo of his bulging crotch that he accidentally made public was sent by a prankster who hacked his Twitter account.

But Weiner finally came clean last week as some of his online pals began to emerge with salacious details, prompting calls for his resignation that grew into a roar.

The revolt from Democratic leaders had only grew stronger, as they had planned before he resigned to meet Thursday to consider whether to strip Weiner of his role on the Energy and Commerce Committee.

Weiner's resignation letter hadn't yet arrived in the House on Thursday afternoon, which means he's still officially a member. But once it is submitted, the letter could be read on the House floor. The resignation will initiate a special election in New York -- a scenario that would favor Democrats.

House Democratic leader Nancy Pelosi said in a statement that Weiner "made the right judgment in resigning."

"Congressman Weiner exercised poor judgment in his actions and poor judgment in his reaction to the revelations," she said.

House Democratic Caucus Chairman John Larson said, "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."

Sen. Chuck Schumer, D-N.Y., who once employed Weiner as a spokesman and served as a mentor to him, said, "On this sad day, we should not forget that Anthony Weiner was an effective and passionate advocate for the people he represented in Brooklyn and Queens. He has servived his community, city, and country well for over two decades."

Rep. James Clyburn, the No. 3 Democrat in the House, wished Weiner and his family well and said he looked forward to Congress "Focusing on the very important work we have to do on behalf of the American people."

Before Weiner's press conference, Rep. Nita Lowey, D-New York, offered Weiner words of encouragement.

"There is life after Congress for Anthony Weiner and I hope he devotes himself to repairing the damage he caused to his personal life," she said.

Weiner's resignation came after the scandal grew even stranger when former porn actress Ginger Lee who exchanged emails and messages with the congressman said Wednesday he asked her to lie about their interactions. Lee called for Weiner to resign.

Her attorney, Gloria Allred, said in a statement Thursday that the scandal "should serve as a clear message to those in public office that there is a standard of conduct which is expected and demanded of them and if they fail to meet that standard then they will be forced to suffer the consequences."

Fox News' Jana Winter contributed to this report.