Pro-union supporters celebrate as Scottish independence referendum results are announced in Glasgow, Scotland. AFP/Getty Images

EDINBURGH—Voters in Scotland rejected a heated bid for independence, providing a narrow escape for a British government that scrambled to dole out promises of new local powers for Edinburgh to head off the breakup of a 307-year-old union.

Scottish First Minister Alex Salmond said early Friday he accepted that the majority of Scottish voters had decided not to become an independent country.

The tally at around 6:30 a.m. local time, which included results from 31 of the 32 districts in Scotland, showed 55% of voters rejecting the independence question and 45% favoring it. About 3.5 million votes had been counted. More than four million people were registered to vote in the election.

Scotland's First Minister Alex Salmond conceded early Friday that Scotland had voted to stay within the U.K. Photo: Getty Images

Mr. Salmond said the fact that around 1.6 million people voted to exit the union was a victory in itself. "I don't think of any of us…would have thought such a thing could be credible or possible," he said.

While the pro-independence camp won expected victories in places like Glasgow and Dundee, the U.K. government's late press to pull out a victory appeared to help avert a major embarrassment. The outcome is a relief for British Prime Minister David Cameron, who agreed to the referendum in a deal two years ago with Mr. Salmond, then watched as a double-digit lead dissolved to a dead heat on the back of relentless campaigning by Mr. Salmond and the pro-independence campaign.

The government issued tough warnings that Scotland's economy would suffer if it escaped the U.K.'s embrace. But the late surge to reject the independence movement was also fueled by pledges from the three major parties of new powers that would bring more self-rule to Scotland.

Mr. Cameron said work would begin to grant the devolved government of Scotland more control over tax, spending, and welfare, with a view to forming plans by November and draft legislation published by January.

"To those in Scotland skeptical of the constitutional promises that were made let me say this—we have delivered on devolution under this government and we will do so again in the next parliament," Mr. Cameron said following the result. "The three pro-union parties have made clear commitments on further powers for the Scottish parliament—we will ensure that those commitments are honored in full."

In a surprise proposal, Mr. Cameron also said England, Wales and Northern Ireland should have greater independence in how they govern their affairs.

Mr. Cameron congratulated Alistair Darling, the Labour politician who helped spearhead the "no" camp, on a "well-fought campaign" in a message from his official Twitter account.

"Today is a momentous result for Scotland and also for the United Kingdom as a whole," said Mr. Darling. But he also acknowledged the large numbers that had voted for independence. "Every political party must now listen to their cry for change," he said, in a speech as the results were announced Friday morning.

Market Talk

Scotland 'No' Boosts Spanish Bonds The relief following the rejection of independence by Scottish voters isn't only being felt in U.K. assets. Spanish bonds have made early gains, reversing some of the weakness seen in recent weeks as investors worried that surging support for a Scottish breakaway could encourage separatists in Catalonia, due to hold their own referendum in November—albeit without Madrid's blessing. Spanish 10-year bond yields are down 0.06 percentage point at 2.22%, with Italian bonds also benefitting. Still, the Scottish-inspired relief rally is likely to be short-lived, according to UBS strategist Justin Knight. "After this, the impact on Spanish yield spreads stemming from the Catalan situation will, we think, be the result of developments within Spain only," he says. (tommy.stubbington@wsj.com)

Market Talk is a stream of real-time news and market analysis that is available on Dow Jones Newswires

The financial markets expressed relief. The "no" vote "removes the huge political and economic uncertainty of untangling the 307-year-old union," said HSBC analyst Simon Wells in a research note Friday morning. "The downside risk to U.K. growth has lifted and we think it keeps the (Bank of England) on track to raise rates in February next year."

The British pound jumped sharply against the U.S. dollar Friday and hit its highest levels in years against the euro and yen.

A key factor in interpreting the results early Friday was voter turnout, which was high across the country following a campaign that consumed Scotland—but lower in some places that would be expected to support breaking away from the U.K.

Mark Diffley, research director at pollster Ipsos-Mori, said the win for the "no" campaign came to down to high voter turnout in areas that tended to support staying with the U.K. At the same time, areas with higher support for independence, such as Glasgow and Dundee, had relatively low voter turnout. Turnout in Glasgow was 75%, which is low compared with other districts that saw turnout above 90%.

"It's turnout that's crucial," Mr. Diffley said. He also said that in a referendum that involves change vs. staying the same, the status quo option will tend to do better at the polls than is predicted immediately before.

Glasgow, Scotland's biggest city, backed independence by 53% to 47%. The "yes" camp also won Dundee, an industrial town on Scotland's east coast and the districts of North Lanarkshire and West Dunbartonshire.

In the early hours of Friday morning, the hundreds of Scottish independence supporters still gathered in the center of Glasgow faced up to defeat, a future as part of a union and substantial hangovers.

"People die for self-determination," said Ally Gray, a 23-year-old data analyst as he lay on the floor. "All we had to do was cross a box and we couldn't even do that."

Mr. Salmond, leader of the Scottish National Party and the central figure in the diverse, grass-roots pro-independence campaign, had urged Scots to take the plunge, saying the nation would be richer and happier if it breaks away from the U.K.

But Mr. Cameron and other senior politicians spent the past two weeks in frantic dashes between Scotland and England to shore up support for the union. They have tried to persuade Scots that independence is fraught with economic risks that would endanger advocates' vision of a Scottish government with a freer hand to intervene to lower poverty and reduce inequality.

The U.K. government must now deliver on time and in full the newly devolved powers to Scotland that have been promised, Deputy Prime Minister Nick Clegg said on Friday.

In a short statement, he said he was "absolutely delighted" that Scots had rejected independence in a referendum, adding that he had no doubt the U.K. was stronger, safer, and more prosperous together than it ever could be apart.

Supporters from the "no" campaign celebrate in Edinburgh on Friday. Reuters

Write to Jason Douglas at jason.douglas@wsj.com, Jenny Gross at jenny.gross@wsj.com and Chiara Albanese at chiara.albanese@wsj.com