Donald Trump has attacked a former beauty pageant winner who criticised him for alleged sexist and misogynistic remarks as "disgusting".
In a stream of tweets, the Republican presidential nominee urged Americans to examine Alicia Machado's personal history and her "sex tape".
He implied his Democratic rival Hillary Clinton had secured US citizenship for Venezuelan-born Ms Machado.
In response, Mrs Clinton tweeted: "This is unhinged, even for Trump."
Ms Machado says she was called "Miss Piggy" by the Republican candidate for the White House when he owned the Miss Universe beauty pageant, after she put on weight following her 1996 title win. She also says he called her "Miss Housekeeping" because of her Latina heritage.
Her case was raised by Mrs Clinton in the first presidential debate earlier this week as an example of Mr Trump's attitude to women.
Did Crooked Hillary help disgusting (check out sex tape and past) Alicia M become a U.S. citizen so she could use her in the debate?— Donald J. Trump (@realDonaldTrump) September 30, 2016
In his early-morning Twitter outburst, Mr Trump said Ms Machado had a "terrible" past that a "duped" Mrs Clinton had overlooked before holding her up "as an 'angel'".
He added: "Did Crooked Hillary help disgusting (check out sex tape and past) Alicia M become a US citizen so she could use her in the debate?"
In her Twitter response, Mrs Clinton asked: "What kind of man stays up all night to smear a woman with lies and conspiracy theories?"
"His latest Twitter meltdown is unhinged, even for him.” —Hillary on Trump— Hillary Clinton (@HillaryClinton) September 30, 2016
She added: "When something gets under Donald's thin skin, he lashes out and can't let go. This is dangerous for a president."
Mr Trump later returned to Twitter - in the daytime - after news outlets had spent hours discussing his late night tirade.
For those few people knocking me for tweeting at three o'clock in the morning, at least you know I will be there, awake, to answer the call!— Donald J. Trump (@realDonaldTrump) September 30, 2016
The Associated Press news agency says Mr Trump's "sex tape" taunt appears to refer to footage from a Spanish reality show in 2005 in which Ms Machado appeared on camera in bed with a male contestant. The grainy images were posted this week to a newspaper's website.
In a statement on Instagram, Ms Machado said: "The Republican candidate and his team are again generating attacks, insults and trying to resurrect false allegations on my life. Their purpose is to intimidate me, humiliate me and tip me off balance. The attacks are slanders and lies full of bad intentions, with no basis.
"With his hate campaign, the Republican candidate insists in discrediting and demoralising a woman - one of his worse characteristics."