“The polls were wrong again,” declared a headline in yesterday’s New York Post. On this side of the water a contribution to the Daily Telegraph argued “the polls were wrong and Trumpism is vindicated”. 

Even on the other side of the world, the Sydney Morning Herald was moved to opine the result of the US presidential election represented “a failure of mainstream opinion polling”.

Yet were the polls as wrong as these headlines suggest?

There is no doubt the polls all reckoned Joe Biden was favourite to win the election. On average, the final polls suggested he was as much as seven points ahead of Donald Trump in the national popular vote. Meanwhile, various attempts to convert the polling numbers into electoral college votes all put the former vice-president well ahead of the 270 votes required for victory.

And it is still possible he will win, albeit perhaps by the narrowest possible margin.

Read more: Alison Rowat: America the beautiful faces future filled with ugly doubt

Everything hangs on the outcome of two or three close races whose final tally will not be known for days as officials deal with a multitude of postal votes.

But even if President Trump does secure a second term, the evidence that he could potentially do so was very clearly there in the polls.

In the crucial, detailed polls in individual states there were no fewer than nine battlegrounds where on average the two principal candidates were two points or less apart. In any election, the only sensible conclusion to draw when the polls are that close is that no-one knows who will win.

Meanwhile, given that the history of US polling suggests the polls cannot be relied upon to get within three points of the final tally for each candidate, there certainly was every reason for caution about what the final result would be. These nine states, which included Florida and Texas, accounted for as many as 159 Electoral College votes. The outcome in these key contests clearly had the potential to swing the outcome in one direction or the other.

True, if they divided equally between the two candidates then, given his apparent strength elsewhere, Joe Biden would win. Indeed, if the Democrat nominee were to secure victory in most of them then there might be something approaching a landslide, a possibility that some Democrats had seemingly come to regard as a certainty.

On the other hand, if most of them were to back the President he might just manage to win a second term. And, indeed, most attempts to forecast the outcome of the Electoral College on the back of the polls indicated that they could not rule out the possibility of a Donald Trump victory.

Read more: Scott Wright: Would Biden win lift Scotch whisky’s prospects in US?

In the event, four of the nine key battlegrounds ended up in the President’s column – in most instances quite comfortably. In these instances at least the polls did underestimate his strength.

But the other five battlegrounds comprise all but one of the half-dozen states which, as of last night, were still deemed too close to call. Whichever way the local race eventually falls, in each case the margin looks set to be close – just as the polls anticipated.

And while the sixth close race, Michigan, was one in which on average the Democrats were reckoned to be as much as five points ahead, such a lead was, given the polls’ track record, too small to assume the state was in the bag. For the most part, the polls did a good job of pinpointing which were the key races that would eventually determine who would spend the next four years in the White House.

But what of the average seven-point lead for Joe Biden in the polls’ estimate of the national vote? Presumably that at least must have been badly out. One thing of which we can now be sure is that the former vice-president will, in line with the polls, emerge on top in the national popular vote – just as Hillary Clinton was ahead of Donald Trump in 2016. The polls should not be blamed for the failure of the Electoral College to reflect the majority vote. We will have to wait weeks before the final tally is known – when we will finally be able to make a reasoned judgment on how well or badly the polls have performed. At present the Democrat lead is two points. That may eventually grow. In that event, we may conclude that the national polls somewhat underestimated Donald Trump’s strength.

However, this would hardly represent a major polling miss as so many commentators have seemingly been all too ready to assume. But, then, perhaps they had not always looked that closely at what the polls were really saying.

Sir John Curtice is Professor of Politics at Strathclyde University and President of the British Polling Council