At one of the last debates during the Republican primary, rival Ted Cruz turned to Donald Trump and asserted he was too cosy with Hillary Clinton to take her on - much less take her down - in a presidential debate. Trump shot back that he was "the last person that Hillary Clinton wants to face".
By May, Trump was getting cocky. "I sort of wish we had more than three," he boasted on CNBC.
But at the end of the third debate, it was clear that Cruz had been correct, if for different reasons: Trump proved to be no match for Clinton.
For the first hour or so of a competition here that he desperately needed to turn into a referendum on Clinton, Trump advanced a methodical contrast of their views on guns and the Supreme Court and offered an aggressive, if shaky, critique of Clinton's record on immigration abortion and other matters. But he appeared rattled at times by her jabs and then fell back into a habit that has tripped him up time and again: making the debate about himself and his controversial views.
"I will look at it at the time," he said in a response to a question from moderator Chris Wallace about whether he would accept the results of the election, echoing his unsubstantiated claims on the campaign trail of a "rigged" contest.
The real estate businessman and reality TV star long billed himself as the ideal messenger to prosecute a devastating case against Clinton before tens of millions of onlookers - a political outsider with a knack for piercing insults who could sow serious doubts about her character.
Instead, during nearly 300 minutes over the past month, Trump repeatedly missed chances to communicate a clear case against her. Instead, he mostly shone a spotlight on his own weaknesses and stumbled through a series of unforced errors - feeding concerns about his treatment of women, his readiness for the presidency and his temperament for the job.
For Trump, the debates have been at the centre of the most destructive two-month period of his campaign, when he has faced multiple accusations of unwanted sexual advances against women and blowback over his vulgar comments on a hot microphone about forcing himself on women sexually. He now trails Clinton by a wide margin in nearly all national and battleground state polls, and party leaders fear it is too late for him to recover.
For the GOP, the debates have amounted to an enormous missed opportunity to mount its case against Clinton, which has been years in the making and which many Republicans were once confident would be their key to victory. Trump struggled throughout the debates to keep a consistent focus on Clinton rather than himself, just as he has in the rest of the campaign.
At times yesterday, Trump showed flashes of the debater many Republican leaders have been eager to see emerge. He landed a blow against her shift on trade and raised a recently revealed video showing a Democratic operative bragging about disrupting Trump rallies.
But for the most part, Trump was repeatedly on the defensive on issues that have dogged him throughout the year. "I don't buy boats, I don't buy planes," he said in response to a question about his charitable foundation, which has come under heavy scrutiny over its questionable practices.
Clinton seemed keen on getting under Trump's skin by needling him with certain words. She said he "choked" during his meeting with Mexican President Enrique Pea Nieto by not pressing his proposal to build a wall on the Southern border of the United States and make Mexico pay for it.
She later said Vladimir Putin preferred a "puppet as president of the United States," referring to Trump's repeated praise of the Russian President as a strong leader. "You're the puppet," he shot back.
"I never met Putin. This is not my best friend," Trump said a few minutes later, while casting doubt on the finding by US intelligence agencies that Russia is behind a series of hacks aimed at disrupting the US elections.
When Trump emphasised his hard-line views on immigration and border security, he opened himself up to attacks when he remarked, "We have some bad hombres here, and we're going to get them out."
" 'Hombres'? The only bad hombre here is @realDonaldTrump and his racist, xenophobic rhetoric," Catherine Cortez Masto, the Democratic nominee for a closely contested US Senate seat in Nevada wrote on Twitter.
Trump's debate problems started at Hofstra University on September 27. He missed chance after chance to scold Clinton for labelling half of his supporters a "basket of deplorables" or to raise her use of a private email server as Secretary of State. He lingered in talk about the "birther" controversy and reignited a feud with Alicia Machado a the 1996 Miss Universe winner.
A 2005 tape on which Trump can be heard bragging about forcing himself physically on women was a focal point at the debate in St Louis, where he apologised for the remarks but also dismissed them as "locker-room talk".
A series of women have come forward accusing Trump of making sexual advances without their consent. He once again denied the allegations and declared that no one has more respect for women than he does. But towards the end of the debate, Trump, who desperately needs to improve his image among female voters, attacked Clinton in a way that could further complicate the task. "Such a nasty woman," he said with disdain in his voice.
Winners & Losers
Winner Hillary Clinton: This was the Democratic nominee's best debate performance. She finally figured the right calibration of ignoring and engaging Trump. Given her considerable edge in the electoral map, Clinton didn't need a moment in this debate, she simply needed to survive. But she had a moment anyway - with a stirring answer in response to Trump's comments about women. Clinton, borrowing from Michelle Obama's speech on the same subject, was deeply human and relatable in that moment. Throughout the rest of the debate, she did what we know she knows how to do well: She deftly dropped a series of opposition research hits and attempts to goad Trump into mistakes.
She came across as calm and composed in the face of his, at times, tough to watch interruptions. ("Such a nasty woman," Trump said of Clinton as she was speaking toward the end of the debate.) Her performance wasn't perfect; she struggled to defend the Clinton Foundation, for example, but Trump managed to throw her an opening to talk about his own foundation's issues. All in all, Clinton won - a clean sweep of the three debates.
Loser Donald Trump: Top to bottom, this was Trump's most consistent and best debate. But, it wasn't a good debate for him. Not at all. His signature moment - and the defining moment of the entire debate - came when he refused to say he would concede if the elections results showed he had lost. Trump's I'll-just-wait-and-see answer was a total disaster and will be the only thing people are talking about coming out of the debate.
Trump wasn't all bad in this debate. His first 30 minutes were actually quite good. But, as has so often been the case in this campaign, Trump simply couldn't stick to his plan.
As the debate wore on, he became more and more short-tempered and curt; it culminated with his sarcastic praise for Clinton regarding Isis and his "such a nasty woman" interruption.
Trump's task in this debate - to fundamentally re-jigger its course - was always a bridge too far. But, it's hard to see how he even made incremental progress toward that goal yesterday.