Kim Hjelmgaard

USA TODAY

EDINBURGH, Scotland — Scottish voters decided they are better off remaining part of the United Kingdom, a blow against independence that produced a huge sigh of relief in London and averted an uncertain future for the country.

The first casualty of the vote came Friday when the leader of the independence movement, Alex Salmond, announced he would resign as the first minister of Scotland and the leader of his political party, the Scottish National Party (SNP).

"For me as leader my time is nearly over but for Scotland the campaign continues and the dream shall never die," Salmond said.

Early Friday, Prime Minister David Cameron hailed the result of the vote, saying "It would have broken my heart to see our United Kingdom come to an end."

"The people of Scotland have spoken and it is a clear result. They have kept our country of four nations together, and like millions of other people, I am delighted," Cameron said in a news conference from 10 Downing Street.

With Scotland's 307-year-old marriage with England hanging in the balance, polls had indicated a tight race. However, the No vote made a decisive victory as the independence referendum was defeated 55% to 45% amid an unprecedented high voter turnout of 84% of the 4.2 million who had registered to vote.

The result spares the United Kingdom the loss of a third of its land mass, 8% of its population and international prestige and power on the world stage. A separation would have cast into doubt the role of Scotland in the European Union and NATO, the status of the British pound, and the fate of assets ranging from North Sea oil to the nuclear submarines.

Glasgow, Scotland's largest city, voted for independence by better than 53%, but the two other big cities voted to stay with the U.K. The oil city of Aberdeen voted decisively to stay with the U.K., 59-41%. Edinburgh voted 61% to remain in the U.K.

Dundee was the first of Scotland's 32 districts to show support for independence, voting 57% in favor. In Clackman, where support for independence had been expected to be strong, the vote was 54% against the referendum. In Orkney, another smaller region, the No forces won decisively with 67%.

"Today is a momentous result for Scotland and also for the United Kingdom as a whole," Alistair Darling, who chairs the pro-Union Better Together campaign, told a crowd of supporters early Friday. "By confirming our place within the Union we have reaffirmed all that we have in common and the bonds that tie us together. Let them never be broken."

A leading advocate of independence, Deputy First Minister Nicola Sturgeon conceded her side had lost, calling the result "a deep personal and political disappointment" but adding "the country has been changed forever," the BBC reported.

The White House welcomed the result of the referendum, congratulating Scottish residents for their "full and energetic exercise of democracy," President Obama said in a statement.

"Through debate, discussion and passionate yet peaceful deliberations, they reminded the world of Scotland's enormous contributions to the U.K. and the world, and have spoken in favor of keeping Scotland within the United Kingdom," Obama added. "We look forward to continuing our strong and special relationship with all the people of Great Britain and Northern Ireland."

The British pound hit a two-year high against the euro on the news, and the FTSE 100, Britain's main market index, opened higher as traders favored stability in keeping Great Britain united over the economic and political uncertainty that independence would have brought.

​"Now the debate has been settled for a generation, " Cameron said. "We have heard the settled will of the Scottish people."

The pro-nationalist campaign had argued an independent Scotland would be better off on a range of issues, from fending off efforts in London to trim Scotland's social safety net to increasing jobs and economic vitality.

Those for independence said traditionally left-leaning Scotland would benefit from breaking away from the conservative economic policies of the parliament in London.

Contributing: William M. Welch from Los Angeles