Now, the task was to heal the divide - and use the energy the referendum unleashed to hold London politicians to promises of more powers for Scotland.
The result - 55 percent to 45 percent - was more decisive than pollsters had foreseen and prompted Scottish First Minister Alex Salmond, who led the unsuccessful Yes campaign, to resign.
But it meant almost half of Scotland's more than 5 million people woke up in a country, the United Kingdom, that they wished to leave.
Queen Elizabeth II, who has kept out of the political debate, said Friday that "all of us throughout the United Kingdom will respect" the result.
In a statement from her Scottish home at Balmoral castle, the monarch said "despite the range of views that have been expressed, we have in common an enduring love of Scotland, which is one of the things that helps to unite us all."
Still, Yes supporters have first to get over their bitter disappointment.
"This time, I thought my vote would count for something," said truck driver Calum Noble, 25, his voice cracking with emotion as a drizzly mist enveloped the Scottish city of Glasgow.
"I wanted a better country, but it's all been for nothing. I don't believe we will get any of the things the London politicians promised."
Salmond's impassioned plea to launch a new nation fell short, with Scots choosing instead the security of remaining in union with England, Wales and Northern Ireland. Yet the independence drive tapped a wellspring of youth and energy that campaigners vowed would endure.
"My time as leader is nearly over, but for Scotland the campaign continues and the dream shall never die," Salmond said Friday as he announced he would step down as first minister and leader of the Scottish National Party in November.
Salmond said Thursday's vote on independence had been "galvanizing, wonderful, empowering."
"We now have the opportunity to hold Westminster's feet to the fire on the vow that they have made to devolve further meaningful power to Scotland," he said.
In the last weeks of the campaign, Prime Minister David Cameron and other London-based politicians vowed more autonomy for Scotland if voters rejected separation. A visibly relieved Cameron said Friday he would stick to his word on further powers for each of the U.K. four regions - a pledge that could change the country forever.
Promising to give Scotland new powers on taxes, spending and welfare, Cameron told reporters outside his Downing Street office that the new plans would be agreed upon by November, with draft legislation by January.
"Just as the people of Scotland will have more power over their affairs, so it follows that the people of England, Wales and Northern Ireland must have a bigger say over theirs," Cameron said. "The rights of these voters need to be respected, preserved and enhanced as well."
Turnout in the referendum was just under 85 percent, the highest level in Britain for more than half a century.
The No campaign won by wide margins in the capital, Edinburgh, and in Aberdeen, the country's oil center. The Yes campaign won Glasgow, Scotland's biggest city.
The vote had riveted the world. The strength of Scotland's pro-independence feeling had concerned leaders of NATO and the European Union - and the result disappointed separatist movements from Catalonia to Italy to Quebec.
"At least the Scots went to the polls," said Matteo Mognaschi, an observer from Italy's separatist-minded Northern League who went to Edinburgh to see the vote. "They won't even let us vote."
The No vote saved Scotland's 307-year union with England, bringing a huge sigh of relief to Britain's economic and political establishment, including Cameron, who faced calls for his resignation if Scotland had broken away. It also kept United Kingdom from losing a substantial part of its territory and oil reserves or having to find a new base for its nuclear arsenal, now housed in Scotland.
In Washington, President Barack Obama welcomed Scotland's choice and congratulated Scots for their "full and energetic exercise of democracy."
"Harry Potter" author J.K. Rowling, who had given 1 million pounds ($1.6 million) to the No campaign, hailed "a huge turnout, a peaceful democratic process: We should be proud."
The decision spares Britain a prolonged period of financial insecurity. The pound rose to a high of $1.6509 Friday after the result, and London's FTSE 100 index was also one of the best-performing stock markets in Europe, trading 0.7 percent higher on the day.
"We have chosen unity over division," Alistair Darling, head of the No campaign, said Friday in Glasgow.
Yet in Scotland, deep divisions remain.
Many saw the independence battle as a "heads versus hearts" campaign, with cautious older Scots concluding that independence would be too risky financially, while younger ones were enamored with the idea of building their own country.
The Yes side was more vocal and more visible, but the day was won by what former Prime Minister Gordon Brown - a Scot whose emotional calls for union were crucial to the campaign - called the "silent majority."
"Just because I'm not out in the street in a kilt screaming how Scottish I am, that doesn't mean I'm not a proud Scot. I am. And a proud Brit," said Ger Robertson, 47, who celebrated the result at home in Edinburgh with a dram of his favorite single-malt whiskey.
As dawn broke to lead-gray skies, the dream of independence that had seemed so tantalizingly close evaporated in the soft drizzle the locals call dreich.
Glasgow's George Square, the rallying point for thousands of Yes supporters, was littered with placards and campaign debris. In Edinburgh, a crowd of disappointed would-be revelers outside the Scottish Parliament melted away and the city resumed its workaday routine.
After dark, however, divisions flared in George Square, where hundreds of hard-liners from Glasgow's Protestant loyalist community taunted a smaller group of pro-independence activists. Police, some on horseback, spent hours protecting the Scottish nationalists from the much larger pro-union crowd, who waved British flags, chanted "Rule Britannia!" and used flares to burn Scottish flags. There were no reports of arrests or injuries.
To heal such divisions, the Church of Scotland was to hold a service of reconciliation Sunday at Edinburgh's St. Giles Cathedral, urging the nation to unite.
"It's been very tense," said Geoff Aird, a retired firefighter who voted No.
"Because it was so close, there could still be agitation for something more for the Yes campaign," he said. "I would understand that and accept that. Let's listen to what the Yes people say."