North Ayrshire has voted to remain in the European Union - but the UK as a whole has voted to leave.

In total, 38,394 voters chose to remain within the EU while 29,110 voted to leave.

This amounted to a 57 per cent victory for remain against 43 per cent.

The overall turnout was 64.6 per cent in North Ayrshire with 44 rejected ballots.

Both East and South Ayrshire also voted to remain by 58 and 59 per cent respectively.

But although all of Ayrshire - and every local authority area in Scotland - voted to remain, the UK voted to leave the European Union by 52 per cent to remain's 48 per cent.

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."

Yvonne McLellan, Vice Convenor of the Ayrshire Green Party said:

“It’s distressing to see that the Brexit Campaign that was often filled with divisive and racist language has been successful south of the border. Whether you were Yes or No during the Scottish referendum we were all told that if we voted Yes we would be pulled from the EU and are now living with the consequences of this being true by remaining part of the United Kingdom. 

"The Scottish Greens will not stand by to watch Scotland dragged out of the EU against our will and are going to do everything we can to ensure that Scotland remains part of the EU. We have launched a petition and will examine every option to ensure we continue our close ties with Europe and hope that we can work together with other political parties in Scotland so that we can defend our rights as EU citizens.”

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.”