Newly empowered British Prime Minister David Cameron moved swiftly to establish the terms and priorities for his new government on Friday after a stunning national election that delivered his Conservative Party an unexpected majority, devastated three other parties and redrew the political map of Scotland.

Following predictions that the post-election maneuvering to form a government might take days if not weeks, the Conservative Party’s big victory produced a quick end to speculation about what or who would be in charge.

But if the election produced an unexpectedly clear outcome, it may only have heightened the degree to which the country faces a period of internal debate, ­inward-looking politics and potential instability, with questions about the durability of the United Kingdom and its place in both Europe and the world still to be answered.

Cameron will have to find a way to manage resurgent Scottish nationalists who are demanding more powers and possibly another referendum on independence. Further, his pledge to hold a referendum to determine Britain’s future in the European Union will continue to raise uncertainty about the country’s commitments and reliability there.

Barely two weeks ago, Cameron was under pressure to step up his performance on the campaign trail. On Friday, he took a ritual trip to Buckingham Palace for an audience with Queen Elizabeth II, who asked him to form a government. Minutes later he was back outside 10 Downing Street promising to bind up a nation that had come under significant strain during a campaign that inflamed the passions of nationalism.

“We must ensure that we bring our country together,” he said. “As I said in the small hours of this morning, we will govern as a party of one nation, one United Kingdom.”

Cameron reiterated his vow to hold a referendum on Britain’s E.U. membership. He also emphasized the carrots in the Conservative Party manifesto — including job-training assistance, additional child-care benefits and home-building programs — but sidestepped mention of the huge welfare cuts needed to bring these to fruition.

Political upheaval

The Conservatives will hold 331 seats in the 650-seat Parliament, while the devastated Labor Party will shrink to just 232.

The Liberal Democrats suffered even greater losses, paying a steep price for having entered into a coalition with the Conservatives after the 2010 election gave no party a majority. From 57 seats in the last Parliament, the Liberal Democrats will enter the new Parliament with just eight members.

The other big winner in Thursday’s voting was the Scottish National Party, led by Nicola Sturgeon. Eight months after losing an independence vote, the SNP captured 56 of the 59 Scottish seats in the national Parliament, destroying the Labor Party in its traditional stronghold. The stunning gains by the SNP not only redrew the politics of Scotland but will add to the challenges Cameron faces in governing a now clearly divided United Kingdom.

The U.K. Independence Party saw its support rise to 13 percent in the national vote, but could claim only one seat because of Britain’s first-past-the-post voting system.

Rather than speculation about who would form the government, Friday brought questions about the future of parties that had been shattered by the strength of the Conservative victory. In rapid succession, the leaders of three parties — Ed Miliband of Labor, Nick Clegg of the Liberal Democrats and Nigel Farage of UKIP — announced that they would resign their positions, an unprecedented series of changes that underscored the wreckage left behind after the voters had spoken.

Labor and the Liberal Democrats face potentially lengthy periods of infighting and introspection as they seek paths back to greater strength and popular appeal. The depths to which both have fallen and the lack of clarity about who will lead them was yet another unexpected outcome in an election filled with surprises.

For all the attention it drew for its anti-immigration views and the pressure it sought to put on Cameron, UKIP ended up with just a single seat. In addition, Farage, the party’s charismatic and controversial leader, lost his bid to win a seat to a Conservative. His resignation as leader fulfilled a pre-election promise, but he did not rule out a comeback. For now, the loss of Farage robs UKIP of its most visible spokesman, leaving open questions of how the party will expand its appeal.

Economic focus

The Conservative victory was a tribute to the campaign run by Cameron and campaign chief Lynton Crosby. The campaign’s message was built around an improving economy, with a strategy designed to put Miliband and the Labor Party on the defensive over the party’s economic reliability and its potential reliance in government on support from the SNP.

Polling showed that respondents believed the economy had improved under the Conservatives, even if they did not believe the benefits had been equitably distributed. Cameron also ran ahead of Miliband on whom voters preferred as prime minister.

The Conservatives ruthlessly went after their coalition partners, the Liberal Democrats, in competitive districts; through targeted messaging, the party also sought to deny Labor seats it hoped to pick up. An energized, passionate and particularly ­negative Cameron campaigned through key target areas in his final push, warning voters not to let Labor back into power.

Miliband won praise for his campaign performance but in the end couldn’t shake doubts about his party and his leadership. One such misgiving was over Labor’s economic management, a fear that the last Labor government had spent too much and would do so again.

More damaging to Miliband and Labor was the rise of the SNP and its impact on voting in both Scotland and England. Sturgeon’s performance in an early televised debate put the issue of the SNP in Parliament into the forefront of the campaign, which Cameron and the Tories quickly exploited to Miliband’s detriment.

“Nationalism squeezed Labor on both ends,” said David Axelrod, long a top adviser to President Obama who was hired to advise the Labor campaign. “The SNP played nationalism in Scotland. The Tories played fears of the SNP skillfully in England.”

The Conservative campaign also drew heavily on the techniques employed by Obama’s 2012 reelection campaign. It used analytics, modeling, targeting and ­social media to reach the voters it needed in the most competitive contests, whether in head-to-head competition with Labor or in districts where three or even four parties were taking votes from one another.

This data work was overseen by Jim Messina, Obama’s 2012 campaign manager, who was recruited by Cameron and Crosby. A week before the election, Messina’s internal projections showed the Tories on track to win 306 seats — far above any public poll at the time — though many races remained extremely close.

On the morning of the election, Messina delivered a document to Crosby projecting that the party would win 312 seats that night. By early that afternoon, based on additional calls, the number was raised to 319.

That ended up tracking almost precisely with the BBC’s projection, based on exit polls, of 316 seats — a prediction that was released as the polls closed and that produced shock waves of surprise.

Daniela Deane contributed to this report.

Read more

7 ways the British elections could change Britain

A new political order in Scotland threatens to upend the British election

British election results signal seismic political shift in Scotland