Counting of votes is taking place across Scotland. Picture: Michael Gillen

The result in the Capital was 74 per cent for Remain and 26 per cent for Leave – a bigger pro-EU margin than predicted, on an above-average turnout.

But the joy of the Remain campaigners attending the city’s count at Meadowbank sports centre was dampened by the results coming in from the rest of the country.

Edinburgh South West SNP MP Joanna Cherry said: “I’m very pleased Edinburgh has voted resoundingly to remain – I’m not surprised; it’s what I expected from speaking to voters over the last couple of months.

Sign up to our daily newsletter The i newsletter cut through the noise Sign up Thanks for signing up! Sorry, there seem to be some issues. Please try again later. Submitting...

“I’m also pleased that across Scotland people appear to have voted Remain by a substantial margin. But there is a significant difference between what has been happening in Scotland and south of the Border,”

A breakdown of the Capital’s voting shows Edinburgh North & Leith and Edinburgh South had the strongest Remain votes, both at 78 per cent; Edinburgh East and Edinburgh South West were both 72 per cent Remain; and Edinburgh West was 71 per cent. Edinburgh was always expected to be strongly pro-EU, but the overall result of 74 per cent support for Remain – announced by council chief executive and returning officer Andrew Kerr shortly after 3.30am – was more than expected.

A survey during the campaign had suggested 62.8 per cent support in Edinburgh for staying in the EU, compared with 20.7 per cent for leaving and 16.5 per cent undecided. Only London had stronger Remain support, at 66.9 per cent.

Edinburgh’s turnout was 73 per cent, with 252,491 voters going to the polls out of the total 346,073 who were eligible to vote.

Supporters of the 'Stronger In' Campaign react as results of the EU referendum are announced. Picture: Getty

Ballot boxes were rushed from all over the city to Meadowbank sports centre for the count as soon as the polls closed at 10pm.

The voting pattern varied significantly between different parts of the city.

Remain supporters said sampling from Edinburgh South at the count suggested some parts of Morningside were as much as 90 per cent Remain.

One said: “The only places which have voted Leave are traditional housing estates.”

Ms Cherry said there were lots of reasons for the Capital’s strong Remain vote.

She said: “Edinburgh is quite a cosmopolitan city and since we have had a parliament for nearly 20 years now, it has become even more cosmopolitan, international and outward-looking. It has always been an international city because of the Festival, but since we have become a true capital city that has increased.

“And people in Edinburgh have benefited from the European Union. Lots of jobs in the financial sector rely on connections with the EU; there are a lot of small businesses in Edinburgh which thrive because of being able to trade with the single market.”

On the wider Scottish picture she said: “Scotland has voted resoundingly to remain and it is the duty of the SNP government to reflect that and ensure the democratic will of voters in Scotland is respected.”

Supporters of the 'Stronger In' Campaign react as results of the EU referendum are announced. Picture: Getty

Other Pro-EU campaigners in the Capital also welcomed the big vote for Remain.

Edinburgh Southern Labour MSP Daniel Johnson said: “I’m pleased that Edinburgh has backed staying in the EU so emphatically. The people of Edinburgh see the benefits the EU brings in terms of universities and the jobs it provides in the financial services sector.

“Clearly it has been a more mixed picture in other parts of the country and there is thinking to be done on the part of politicians about people who feel the status quo is not working for them. That’s a key challenge from this referendum.

“If you look at the reasons people were saying they were voting Leave it boils down to housing, jobs, public services, the ability for people to get on in life. They are attributing these things to immigration – but I think it’s about the wrong set of economic choices made by the government in London and the challenge is to make sure we provide these things –more housing, and people need to be able to find not only jobs but careers.”

Edinburgh Western Liberal Democrat MSP Alex Cole-Hamilton said: “The Edinburgh result is a fantastic endorsement of the very cosmopolitan worldview Edinburgh people have.

“It’s the result of a lot of hard work by all the Remain parties. We should be justifiably proud our capital city is so unashamedly pro-European.”

But he acknowledged some poorer areas of the city had shown a big Leave vote.

“There is a massive split between the haves and have-nots. It is understandable, in a way, that people who live in deprived circumstances feel they have nothing to lose.

“We have an obligation to heal some of the damage caused by the unhelpful rhetoric from the Leave side about immigration.

“There has been an overbearing appeal to fear of the Other – migrants, refugees –and we have to start to unpick some of that.”

In the 1975 referendum on what was then called the European Economic Community (EEC) or Common Market, Scotland was significantly less enthusiastic than south of the Border.

The Yes vote for staying in was 58.4 per cent in Scotland compared with 68.7 per cent in England and 64.8 per cent in Wales.

Support in Lothian for the EEC was slightly above the Scottish average at 59.5 per cent, but nowhere near the 72.3 per cent Yes vote in the Borders and 68.2 per cent in Dumfries and Galloway.

Shetland and the Western Isles were the only two areas in the whole of the UK to return a No majority.