A leading candidate for New York City mayor, Anthony Weiner, said Tuesday he won't quit the race despite newly revealed explicit correspondence with a young woman — an exchange she says began months after he resigned from the U.S. Congress for similar behaviour.

"This is entirely behind me," Weiner told a news conference, just hours after he confirmed exchanging sexually explicit photos and text messages with a woman online. "There was no question that what I did was wrong," he added.

He had resigned his Congressional seat in June 2011 after acknowledging having sexual conversations with at least a half-dozen women.

At Tuesday's news conference, the 48-year-old Weiner acknowledged some of the newly revealed activity took place after he resigned. He repeated that he put such behaviour behind him before deciding to run for mayor.

"I said that other texts and photos were likely to come out and today they have," Weiner said in a statement issued by his campaign earlier in the day. He also said "some things posted today are true and some are not," but he did not elaborate.

'I love him. I have forgiven him,' wife says

His wife, Huma Abedin, a longtime adviser to former U.S. Secretary of State Hillary Rodham Clinton, made rare public comments on her husband's behavior.

"I love him. I have forgiven him. And as we have said from the beginning, we are moving forward," Abedin said. She acknowledged that Weiner "made some horrible mistakes, both before he resigned Congress and after."

New York mayoral candidate Anthony Weiner resigned his Congressional seat in June 2011 after acknowledging having sexual conversations with at least a half-dozen women. (Kathy Willens/Associated Press)

She was pregnant when the sexting scandal broke in 2011 and gave birth months later. "It took a lot of work and a lot of therapy to get to the place where I could forgive Anthony," she said.

After they walked away from the news conference, out of sight of the crowd, Weiner put his arm around her. He then attended a mayoral forum.

The allegation could severely test voters' willingness to forgive Weiner, who has said he spent the two years since the scandal trying to make things right with his wife and earn redemption. Three of his rivals for mayor immediately called on Weiner to drop out of the race.

Weiner used alias 'Carlos Danger', woman says

The newly revealed correspondence was posted Monday by the gossip website The Dirty. The woman involved was not identified. She said their online relationship began in July 2012, when she was 22, and lasted for six months.

She claimed Weiner used the alias "Carlos Danger" for their exchanges, but she knew she was talking to the former congressman.

The woman claimed that she and Weiner exchanged nude photos of themselves and engaged in frequent phone sex. The Dirty ran a pixelated photo of what appears to be a man's genitals.

The exchanges posted on The Dirty consist of sexually explicit fantasizing about various sex acts. At one point, the man reported to be Weiner wrote, "I'm deeply flawed."

The woman said Weiner later asked her to destroy the evidence of their chats. She insisted that she never had sex with Weiner or received any payment from him.

Since re-entering public life this spring, Weiner has apologized repeatedly for his behaviour. He also has been near the top of most mayoral polls since entering the race.

The original scandal began when a website run by conservative commentator Andrew Breitbart posted a photograph of a man's bulging underwear and said it had been sent from Weiner's Twitter account to a Seattle woman. Weiner denied he sent the photo, claiming his Twitter had been hacked.

But after more women came forward and more photographic evidence emerged, Weiner admitted he lied.