LONDON — Prime Minister David Cameron and his Conservatives won a resounding victory in the British general election, with complete results on Friday showing that the party had secured an overall majority in Parliament.
The vote was a stunning disappointment for the opposition Labour Party and its leader, Ed Miliband, who had shifted the party away from the more centrist strategy it pursued in the late 1990s and early 2000s under Tony Blair. Mr. Miliband stepped down on Friday, opening up a new debate over the party’s direction.
The result defied pre-election opinion polls that suggested a tight race between the Conservatives and Labour. It returns Mr. Cameron to 10 Downing Street for a second term, with enough seats in the House of Commons to act on his agenda without having to rely on support from smaller parties.
He went to Buckingham Palace on Friday for the formal step of being invited by the queen to form a new government.
In a brief speech outside his official residence, Mr. Cameron promised to govern fairly for the whole United Kingdom and said: “The government I led did important work. It laid the foundations for a better future, and now we must build on them.”
The Conservatives won 331 of 650 seats in the House of Commons, a gain of 24 seats from the last election, in 2010. Their chief rival, Labour, was nearly wiped out in Scotland by the surging Scottish National Party and did worse than pre-election opinion polls had suggested it would in the rest of Britain. Several of Mr. Miliband’s top lieutenants lost their seats.
“Now the results are still coming in, but this has clearly been a very disappointing and difficult night for the Labour Party,” Mr. Miliband said in a quasi concession speech after being re-elected to his seat in the House of Commons.
“We haven’t made the gains that we wanted in England and Wales,” he said, “and in Scotland we have seen a surge of nationalism overwhelm our party.”
The results were also a disaster for Nick Clegg and his centrist Liberal Democrats, who have been the junior partner in a coalition with the Conservatives. Mr. Clegg hung on to his seat in the House of Commons, but he resigned as party leader after results that exceeded the party’s worst expectations.
“It is now painfully clear that this has been a cruel and punishing night for the Liberal Democrats,” said Mr. Clegg, who had served as deputy prime minister in the departing coalition government under Mr. Cameron.
The final results were something of a shock to a nation that had been conditioned by months of opinion polls to expect days or weeks of negotiations as the Conservatives and Labour tried to cobble together a viable coalition.
With all the constituencies reporting, Labour had won 232 seats, a decline of 26 from the 2010 results. In another humiliating blow for Labour, Ed Balls, who speaks for the party on economic issues and is one of its most influential figures, lost his seat of Morley and Outwood to the Conservatives.
“Any personal disappointment I have at this result is as nothing as compared to the sense of sorrow I have at the result that Labour has achieved across the United Kingdom,” Mr. Balls said after the result was announced.
The Scottish National Party won 56 of 59 seats in Scotland, rolling over Labour. In 2010, the Scottish nationalists won only six seats.
Nicola Sturgeon, the party’s leader, said on Friday that the “tectonic plates in Scottish politics have shifted.”
Many in Glasgow seemed to think that another independence referendum appeared inevitable, despite the defeat of the pro-independence camp in a referendum last year.
The campaign had centered primarily on domestic issues, including the budget austerity imposed by the Conservatives and funding for the National Health Service, but Mr. Cameron had also played up fears that a Labour government, reliant on support from the Scottish nationalists, would drive the country leftward and risk the nation being splintered.
Even if he is able to govern without a coalition partner, Mr. Cameron will start his second term facing immense challenges, not least in holding off calls from Scotland for independence and in managing pressure from inside his own party for Britain to leave the European Union.
Mr. Cameron has promised to try to renegotiate terms of Britain’s membership in the 28-nation European Union and to hold a referendum by the end of 2017 on whether Britain should remain in the bloc.
The results are also likely to fuel calls for a change to Britain’s electoral system, to better represent national voting patterns.
The Scottish National Party, which fielded candidates only in Scotland, benefited from the British electoral system, in which parties compete in 650 districts but the votes of those not elected count for little.
With the Scottish National Party winning 56 seats, Labour was reduced to just one in Scotland. The Conservatives and the Liberal Democrats also held one seat each. The Scottish party is forecast to become the third-largest in Parliament, with less than 5 percent of the nation’s votes.
“The Scottish lion has roared this morning across the country,” said Alex Salmond, former first minister of Scotland and former leader of the Scottish National Party, after being elected to Parliament in Westminster.
The U.K. Independence Party had been expected to draw many more votes across the rest of Britain. After the party he led won just the one seat, Mr. Farage called for a reconsideration of the voting system to give more representation to supporters of smaller parties.
amsi.com & agencies.