British Prime Minister David Cameron appeared poised to remain in power Friday

LONDON — Prime Minister David Cameron and his Conservative Party won a surprisingly solid victory in the British general election on Thursday, with nearly complete results Friday morning showing the party close to an overall majority in Parliament.

The result defied pre-election polls that suggested a tight race between the Conservatives and the opposition Labour Party. It returns Mr. Cameron to 10 Downing Street for a second term, possibly with enough seats in the House of Commons that he will not have to rely on support from smaller parties to enact his agenda.

Cameron’s office said he would go later Friday to Buckingham Palace, where he is expected to tell Queen Elizabeth II that he has enough support to form a government.

The prime minister beamed early Friday as he was announced the winner of his Witney constituency in southern England.

“This is clearly a very strong night for the Conservative Party,” he said, stopping just short of declaring overall victory. He would be the first Conservative prime minister to win a second term since Margaret Thatcher.

“I want my party, and I hope a government that I would like to lead, to reclaim a mantle that we should never have lost – the mantle of one nation, one United Kingdom,” Cameron said, vowing to counter the rise of Scottish nationalism with more powers for Scotland and Wales.

Polls ahead of Election Day showed Conservatives locked in a tight race with the opposition Labour Party, raising the possibility of days or weeks of negotiations to form a government.

The election results increase the likelihood of two major referendums in the coming years: A vote on whether the UK should stay in the European Union, long a goal of the Conservative Party; and another vote on Scottish independence, which is the central policy goal of the SNP.

 Ed Miliband is widely expected to step down as Labour leader following the party’s dismal results. “The results are still coming in, but this has clearly been a very disappointing and difficult night for the Labour party,” he said. “We haven’t made the gains we wanted in England and Wales and in Scotland we’ve seen a surge of nationalism overwhelm our party. Now, I want to say to all the dedicated and decent colleagues in Scotland who have lost their seats that I am deeply sorry for what has happened.”
Labour was nearly wiped out in Scotland by the surging Scottish National Party and did poorer than pre-election polls had suggested it would in the rest of Britain. Several of Mr. Miliband’s top lieutenants lost their seats.