As the first results in the US elections began coming in on Wednesday morning, most of the polls until then seemed to be certain that Democratic candidate Hillary Clinton would beat her Republican contender Donald Trump, that too by a reasonable margin. By about 8 am IST, which is 9.30 pm on America's East Coast, that picture had changed entirely. The New York Times' live forecaster which had been projecting a Clinton win for most of the day had suddenly moved into Trump territory.

Those forecasts are based on the results coming in from various states across the US, putting a percentage on the probability that either candidate will be able to pick up the 270 votes that are required to win the presidency. The fact that this had entered Trump territory at all is significant.

Consider FiveThirtyEight editor Nate Silver's final election update the day before the US went to the polls. Silver said that there were a wide range of outcomes, but most of them point to a Clinton victory, and gave the Democrat a 71% chance of winning. And FiveThirtyEight's numbers were actually more skeptical about Clinton than most, unlike say the Huffington Post which gave the Democrat a 98% chance of winning the presidency.

The NYT's forecast may have tilted over into Trump territory on its probability meter, but its two other projections were equally intriguing. At about 8.20 am IST, it was suggesting that Clinton would win the popular vote, but Trump could cobble together enough electoral votes to become President.

Much of this depends on the final numbers that come in from battleground states, such as Florida, Virginia, Ohio and North Carolina, none of which had been called yet by American news networks. Of course, none of these numbers are final and much can change between now and 9.30 am IST – the earliest when an election is usually called by news organisations if the lead is clear. If it's still close then, things could go on much longer, as they did in 2000.

What is clear though is that Trump is not getting the drubbing that some expected Clinton to deliver. Many were hoping that Trump, whose campaign has often been marked by its hatred, misogyny and bigotry, would be trounced by Clinton – and the polls seemed to suggest that this was a possibility.

The fact that it's not just tight but also could actually go Trump's way has changed those calculations entirely and has got people to bring up comparisons to another event that similarly see-sawed into a completely unexpected result: Brexit.