In a historic night in politics, North Ayrshire followed the Scottish trend to remain in the EU, but Britain voted to leave, in an incredible night of drama.

The North Ayrshire vote, announced by returning officer Elma Murray, was as follows - Remain a member of the EU: 38,394 votes. Leave the EU: 29,110 votes. There was a 64% turnout in the constituency.

The local vote reflected the trend in Scotland, which overall voted in favour of the UK staying in the EU by 62% to 38% - with all 32 council areas backing Remain.

However, the British Isles as a whole decided to leave on 51.9% with 48.1% wishing to stay with the European Union.

Just after the North Ayrshire Council vote was announced at 2.30am, Conservative councillor Tom Marshall of Largs, said: "It just shows that there is almost a 50/50 split in what the population wants, and it is going to be very hard to meet the aspirations of either side. It varied according to localities.

"For 29,000 people in North Ayrshire to be dissatisfied with the EU is a huge amount of people, and the government has to take some steps to meet these concerns.

"I think it will be more democratic, and we won't have the commission ruling us."

SNP MSP for Cunninghame North, Kenneth Gibson, said: "The SNP is pleased that Scotland voted so comprehensively to remain - all 32 local authority areas voting to do so by a margin of 62% to 38% - but is deeply disappointed that the rest of the UK did not."

Patricia Gibson, MP for North Ayrshire and Arran, added: "I am deeply disappointed that the vote in England and Wales was to leave the EU. I am proud that Scots voted by a significant margin to remain in the EU.

"The future is very uncertain but democracy demands that Scots should have their voices heard. The First Minister will make a full statement in due course but if 55% of the popular vote was enough to keep Scotland in the UK, then 62%of the vote should be enough to keep Scotland in the EU."

David Cameron has announced that he will stand down as Prime Minister in the wake of the result after addressing the world in Downing Street earlier this morning.

Secretary of State for Scotland David Mundell said:

“David Cameron has been a great leader of my Party and of our country. I was proud to be one of his first supporters during the 2005 leadership election and I have never regretted that decision for a moment. His achievements in rescuing our economy and in social reform will stand the test of time. Today he has once again put country before self.

“As the Prime Minister made clear this morning, the UK Government is absolutely committed to working closely with the Scottish Government to ensure they are fully involved in the negotiation process. The Prime Minister has already spoken to the First Minister and I have today offered to meet with the Scottish Government in Edinburgh to discuss next steps.

“The United Kingdom has fundamental strengths and this is a time for calmness and deliberation – not pushing other personal or political agendas.”