As the candidates head into the second Presidential debate, Clinton has had three good weeks in a row, during which Trump has been falling further behind. Photograph by Eric Thayer / The New York Times / Redux

If the Presidential election continues on its current course, historians may well look back on the third weekend in September as the moment when Donald Trump came closest to the White House, while millions of Americans reached for the Xanax. That Saturday, Hillary Clinton's lead over Trump narrowed to one percentage point in the widely watched Real Clear Politics poll average, which combines the results from a number of surveys. A day later, Clinton's lead fell to 0.9 percentage points.

Three weeks later, the numbers look very different. On Friday night, according to the Real Clear Politics poll average, the gap between the two candidates was 4.7 percentage points. (Clinton stood at 47.6 per cent; Trump was at 42.9 per cent.) In the Huffington Post’s poll average, which covers a slightly different selection of polls from the Real Clear Politics survey, Clinton’s lead was even bigger: 6.4 percentage points. (Clinton at 48.1 per cent, Trump at 41.7 per cent.)

These polls were taken before Friday afternoon, when the Washington Post published extracts from a 2005 taped conversation in which Trump boasted about kissing and groping women, saying at one point, “When you’re a star they let you do it,” and adding, "Grab them by the pussy." After the story appeared, Trump sought to dismiss his remarks, which were made on the set of a soap opera on which he was making a guest appearance, as "locker room banter," adding, "I apologize if anyone was offended."

We'll have to wait and see what impact these revelations have on Trump, who is already trailing Clinton badly among female voters. His vulgar and misogynistic comments seem sure to feature in Sunday's debate, and they have emerged as the shift in the national polls has calmed the nerves of many Democrats. Perhaps more important, the numbers in many of the key battleground states have also moved against Trump, making it considerably less likely that he will be able to reach the necessary two hundred and seventy votes in the Electoral College. Back in late September, the New York billionaire was narrowly ahead in Florida, North Carolina, and Ohio, three must-win states for him. But recent state polls indicate that Clinton is now leading in Florida and North Carolina. The state-poll averages do have Trump still slightly ahead in Ohio, but the most two recent surveys, from Public Policy Polling and Monmouth University, showed Clinton with a narrow lead there, too.

Trump supporters would rightly point out that the race is still tight in all three of these states. According to the Real Clear Politics poll averages, Clinton leads by 2.4 percentage points in Florida and 2.6 percentage points in North Carolina. But the trend is clearly running in the Democrat's direction. And, even if Trump turned things around Florida and North Carolina, won Ohio, and carried all the other states that are currently leaning Republican, it would only take him to two hundred and fifty-nine votes in the Electoral College. To get to two hundred and seventy, he'd also have to pick up at least one big Democrat-leaning state, such as Michigan or Pennsylvania, or two or three smaller ones, such as Maine, New Hampshire, and Nevada.

Right now, that looks like a huge ask. The latest poll from Michigan, which was carried out for the Detroit Free Press, showed Clinton extending her lead to eleven points. In Pennsylvania, where both candidates have been campaigning hard, two polls carried out during the past week showed Clinton with leads of nine points and ten points respectively. In the two New England battleground states, Clinton has been ahead for months, and, according to the Huffington Post's poll average, which includes all the latest polls, she still leads by about seven points in Maine and about five points in New Hampshire. The race in Nevada appears to be much closer: the poll averages show a virtual tie. But Nevada only has six votes in the Electoral College.

Some of the improvement in Clinton's position can surely be put down to her resounding victory over Trump in the first Presidential debate, on September 26th. But that's not the entire explanation. Even before Clinton's post-debate bounce started to show up in the national polls, her lead was increasing. On September 28th, for instance, when the polls still largely reflected survey work carried out before the debate, the gap between the two candidates in the Real Clear Politics poll average was back to three per cent.

That means Clinton has now had three good weeks in a row, during which Trump has been falling further behind. One factor, surely, was last month’s bombings in New York and New Jersey, which took media attention off Clinton's pneumonia and her "basket of deplorables" comment. In addition, I suspect the poll trends also reflect a negative feedback effect of the kind I wrote about last month: as Trump surged in the polls, some independents and Bernie Sanders Democrats decided it was time to rally behind his opponent.

Clinton’s strong performance in the debate enabled her to build on a rising trend. You can see that in the head-to-head polls and also in her “favorable”/“unfavorable” ratings, which a number of pollsters track regularly. Real Clear Politics keeps a running average of these figures, too. It shows that between September 26th, the day of the debate, and Friday, October 6th, Clinton’s favorable rating rose from 40.3 per cent to 43.6 per cent, and her unfavorable rating fell from 55.1 per cent to 53.1 per cent.

Yes, these numbers indicate that a majority of voters still dislike Clinton. But her net favorability rating has risen by about four points, to minus 9.5 points, in a short time. And, crucially, she is doing significantly better than Trump, whose net favorability rating on Friday night was minus 20.6 points, which is about the same as it was three weeks ago. None of this means that Trump can’t win. But it does imply he is in deep trouble.

Another argument you hear from Trump supporters, and even from some nervous Democrats, is that the polls might be understating his chances. That could be the case if pollsters are systematically underestimating the likely turnout among groups who like Trump, or they are systematically overestimating the likely turnout among groups supportive of Clinton, or both. It's also conceivable that some Trump voters are reluctant to reveal their support for him to pollsters. These sorts of things can happen. Look at Brexit. Most of the polls in Britain got that result wrong, partly because their assumptions about turnout turned out to be mistaken.

The pollsters could goof up in this election, too, but there is little indication in the voter-registration numbers or the early-voting figures that they are missing something big. Indeed, it is also possible that the polls are underestimating Clinton's lead. Writing in the Wall Street Journal on Thursday, Karl Rove pointed out that, on the day before the 2012 election, the Real Clear Politics poll average showed President Obama leading Mitt Romney by just 0.7 percentage points. When the actual votes were counted, it turned out that Obama had won by 3.9 percentage points, a discrepancy Rove attributed to the Democrats' superior get-out-the-vote operation. This year, with Trump relying largely on the Republican National Committee for his ground game, something similar could happen.

That's speculation. But in any case, with the polls and the electoral map moving against him, Trump doesn't have much time left to turn things around. He desperately needs a better performance in Sunday's debate. And even that might not be enough to save him.