THE pollsters defended their record after having egg on their collective faces the second time in a year after its failure to predict the result of the European Union referendum.

Millions in the UK went to their beds in the early hours confident the Remain campaign had won the day following a YouGov poll of voters that predicted a 52-48 per cent victory and the bookies across the board as polls closed were giving odds of 1/10 on, implying the chances of leaving Europe were below 10 percent.

In the last Ipsos MORI poll on the day of the vote, Remain appeared to storm ahead with an eight point lead.

Even staunch Brexit campaigner, UKIP leader Nigel Farage, all but conceded defeat, saying it "looks like Remain will edge it" after the polls closed.

City banks reportedly commissioned secret exit polls in order to profit from the result by placing big bets on a Remain vote.

But by dawn on Thursday Leave had won by four percentage points and pollsters got the result wrong again, while generally correct in saying it would be close.

Liberal strategist Mark Textor, the managing director and co-founder of the Crosby Textor group, said on Twitter that the Brexit result was “another giant question mark next to published polling and bookies in the UK”.

Peter Kellner, former president of YouGov who was predicting a Remain win by 8.5%, plus or minus six percent on polling day said the result was "bad for pollsters and embarrassing for me".

Ahead of the general election in May last year, major polling agencies almost unanimously failed to predict the 331-232 victory won by David Cameron's Conservatives instead forecasting a tight contest and a possible hung parliament.

Following the result, an independent inquiry was commissioned by the British Polling Council, which found pollsters had systemic failings in their methods that resulted in conservativevoters being under-represented.

Only the exit poll correctly predicted that the result would be Leave 52 percent and Remain 48 percent, and claimed they outperformed all other polling companies

The misguided optimism spread to traders and investors worldwide and the pound crept above $1.50 - its highest level this year - just before midnight as opinion polls foresaw a win for the Remain camp.

“Markets get it wrong sometimes; it’s as simple as that,” said Vasileios Gkionakis, head of currency strategy at UniCredit SpA in London. “What drives them in the wrong direction is momentum. A few start and then the rest follow.”

Glasgow-based elections expert Professor John Curtice, had remained cautious throughout the campaign, saying that “some of the polls are definitely wrong” in “a cloud of uncertainty”.

Eleven out of the last 23 polls in the last two weeks had a Leave lead.

Ipsos MORI and YouGov tried to explain their failures on an unexpectedly high 72 percent turnout on polling day.

Ben Page, chief executive of Ipsos MORI said: "One thing we can say is that it is clear turnout had a big impact, especially given the large differences in attitudes towards the referendum by age, class and region, something we have consistently pointed out and shown in our data.

"Turnout was higher than in the last five general elections, and analysis suggests it was higher in leave supporting areas than regions which supported Remain, such as London.

"Clearly, we are disappointed that this was not more accurate. Having said that, we have consistently said that the race was very tight based on our last two polls, and that the outcome of the referendum was not decided.

"We remain strong advocates of the role polling has to play in illuminating political campaigns."

YouGov defended itself saying that over half of its polls since the start of the year showed Brexit in the lead or tied while financial and betting markets refused to consider Brexit was a possibility.

"We do not hide from the fact that YouGov’s final poll miscalculated the result by four points. This seems in a large part due to turnout – something that we have said all along would be crucial to the outcome of such a finely balanced race," said YouGov.

"Our turnout model was based, in part, on whether respondents had voted at the last general election and a turnout level above that of general elections upset the model, particularly in the North.

"What is clear is that it is a historic mispricing of the risk by the financial markets, the betting markets and the media despite continued evidence from pollsters such as YouGov that the race was close and Brexit was a real possibility," said YouGov.

They suggested it was online sampling that called it right during the campaign and being closest to the final result.

It was a particularly bad news for phone pollsters, who repeatedly recorded a leave for Remain of ten points or more over the preceding months.

Experts say this may be explained by the fact that phone respondents were explicitly asked whether Britain should simply remain in the EU or leave.

Phone participants could have told the pollsters they did not know or that they had not made up their mind. But they were not asked if they were undecided, so the tendency was for a decisive answer to be given.

Polling companies are aware this leads to a situation where most of those polled will opt for the familiarity of the status quo and hence the lead for Remain in telephone polling.

Matthew Shaddick, the political betting boss at Ladbrokes, defended the odds offered by his own industry saying they were based on the vast amount of money which was being wagered on Remain.