Updated

The exit poll in Britain's general election predicted late Thursday that the Conservative Party will win 316 seats, just short of a majority in the House of Commons, meaning that David Cameron will likely remain prime minister.

The surprise poll results were in contrast to polls leading up to the election that suggested Cameron's party would not come close to a majority, and would be locked in a much tighter race with the opposition Labour Party, led by Ed Miliband -- predicted to gain 239 seats in the exit poll.

Cameron's Conservatives would need 326 for an outright majority in the 650-seat House of Commons, although in practice it's about 323: the Speaker does not vote, and Irish nationalists Sinn Fein, who had five seats before the election, do not participate.

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

The Liberal Democrats -- Cameron's coalition partner -- were predicted to see their support collapse and their seat tally drop from 56 to 10.

Meanwhile, the poll predicts that Nicola Sturgeon's Scottish National Party will dominate Scotland, winning all but one seat north of the border and surging its seat count from six to 58.

The anti-European Union U.K. Independence Party (UKIP) was predicted to win two seats, despite running third in many opinion polls before the election. UKIP’s leader Nigel Farage promised to resign as leader if he did not win the seat he is contesting in South Thanet.

If the poll is accurate, it would be a huge defeat for Miliband’s Labour Party, which was predicted by many bookmakers to be most likely to form a government, possibly with the support of the Scottish National Party. The predicted result of 239 seats would be down from the 256 they won in 2010, despite Cameron’s government engaging in painful austerity measures.

It would also mean Labour would be wiped out in Scotland, an area in which it has traditionally been the dominant force.

Senior Labour MP Ed Balls conceded to Sky News that, if accurate, "it is a terrible result for Labour in Scotland. I really hope it’s going to be wrong".

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

Political leaders warned against jumping to conclusions before full results are in, and some expressed skepticism about the poll.

"I have to say it just doesn't feel right," said longtime Labour adviser Alistair Campbell.

Former Liberal Democrat leader Paddy Ashdown was equally skeptical, telling the BBC: "I'll bet you my hat, eaten on your program, that it is wrong."

But early results backed the poll's general trend: In the first constituencies announced, Labour gained some votes from the Conservatives but picked up fewer than needed from the collapse in Liberal Democrat support, and lost votes in some areas to UKIP.

The survey was conducted by pollsters GfK and Ipsos MORI for Britain's broadcasters and released as polling stations closed at 10 p.m. local time.

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 canceled each other out across England and Wales, and that Labour had lost much of its support in Scotland to the SNP.

Curtice said the early results were "in line with the exit poll," adding that a Conservative majority couldn't be ruled out.

As head of state, Queen Elizabeth II formally appoints the prime minister, but her role is symbolic. Once the political picture is clear, Cameron will go to Buckingham Palace -- either to tell her he can form a government, or to resign and ask her to summon Labour’s Ed Miliband.

The Associated Press contributed to this report.