LONDON -- The Conservative Party fared much better than expected in Britain's parliamentary election, with an exit poll projecting that Prime Minister David Cameron could again be forming the next government after the most unpredictable vote in decades.

Cameron beamed as he arrived for the count in his constituency in southern England at around 2:30 a.m. Friday. The result was far better than opinion pollsters, or even his own party, had expected.

The opposition Labour Party of Ed Miliband took a beating, according to the poll, much of it due to the rise of the separatist Scottish National Party. The poll said the SNP would take all but one of the 59 seats in Scotland, most of them from Labour.

Cameron's coalition partner, the Liberal Democrat party, was expected to lose most of its seats on a night that shook the grip of Britain's three biggest parties.

London Mayor Boris Johnson, who is running for a seat in Parliament as a Conservative, said if the exit poll was accurate, "then obviously it's a very, very clear victory for the Conservatives and a very bad night for Labour."

The exit poll projected that the Conservatives would get 316 seats -- up from 302 and far more than had been predicted -- and Labour 239, down from 256. The Liberal Democrats would shrink from 56 seats to 10, while the Scottish nationalists would grow from six to 58.

Based on interviews with 22,000 voters, the poll differed strongly from opinion polls conducted during the monthlong election campaign, which had put the Conservatives and Labour neck-and-neck with about a third of the vote share each.

If the exit poll is accurate, the Conservative Party would be in a commanding position to form the next government by seeking partners from smaller parties.

One result could be re-run of the Conservative-Liberal Democrat coalition that has governed since 2010. The exit poll put the two parties' total at 326 -- just over half the 650 seats in the House of Commons.

But other political leaders warned against jumping to conclusions before full results are in. Former Liberal Democrat leader Paddy Ashdown told the BBC: "I'll bet you my hat, eaten on your program, that it is wrong."

Among the early Scottish National Party winners was 20-year-old student Mhairi Black, who becomes Britain's youngest lawmaker since the 17th century. She defeated Douglas Alexander, Labour's foreign policy spokesman and one of the party's most senior figures. Black is the youngest lawmaker since Christopher Monck entered Parliament in 1667 at age 13.

"This is the most exciting election I can remember," said Lesley Milne, a 48-year-old from Glasgow. "It's time to shake up the politicians in London and the SNP are the people to do it."

All day across the nation of 64 million people, voters streamed to schools, churches and even pubs for a say in their country's future. About 50 million people were registered to vote, and turnout appeared to be high.

The chief exit pollster, John Curtice of Strathclyde University, said the methodology was the same as in 2010, when the poll turned out to be very accurate. He said it looked as if Conservative and Labour gains had cancelled each other out across England and Wales, and that Labour had lost much of its support in Scotland to the SNP.

"In practice, we now have to take seriously the possibility the Tories could get an overall majority" in Parliament, he said.

The survey was conducted by pollsters GfK and Ipsos MORI for Britain's broadcasters and released as polling stations closed and the counting began.

The seat of Houghton and Sunderland South in northeast England was the first to complete the traditional election-night ritual: Votes in each of the 650 constituencies are counted by hand and the candidates -- each wearing a bright rosette in the colour of their party -- line up onstage as a returning officer reads out the results. Houghton and Sunderland South went to Labour, as expected.

The anti-immigration UK Independence Party ran third in opinion polls, but the exit poll predicted it would win just two seats because its support isn't concentrated in specific areas. Leader Nigel Farage has said he will resign if he does not win the seat of Thanet South -- an outcome that looked a distinct possibility.

Television debate appearances in which the public put questions directly to the politicians made plain that many distrust promises to safeguard the economy, protect the National Health Service from severe cutbacks and control the number of immigrants from eastern Europe.

Britain's economy -- recovering after years of turmoil that followed the 2008 financial crisis -- was at the core of many voters' concerns.

In Whitechapel, one of London's poorest communities that is home to a large ethnic minority population, voters struggling in the wake of the worst recession since the 1930s wanted a change in leadership.

"The first priority is the economy, the second one is creating more jobs, and the third is living expenses -- they're going higher and higher," said Shariq ul-Islam, a 24-year-old student.

Just a few minutes away in the City of London, the traditional financial district where many bankers earn enormous salaries, Christopher Gardner, a 34-year-old finance industry official, had trust in the Conservatives.

"There are some issues that have been caused by austerity previously," he said. "They're the only people that I'm confident will resolve that."