LONDON - Prime Minister David Cameron’s Conservatives won a stunning victory in Britain’s election on Friday, which cut short the careers of his top three rivals and put the country’s European Union future in doubt.

Widespread predictions of a close contest with the opposition Labour party turned out to be wide of the mark, as Cameron won 331 out of 650 parliament seats and a new term as head of a majority Tory government.

The victory was focused on England, however.

North of the border, the pro-independence Scottish National Party won a historic landslide, just seven months after losing a referendum on breaking away from the rest of the United Kingdom.

In another dramatic result, the leaders of Labour, the Liberal Democrats and the anti-EU UK Independence Party (UKIP) all stepped down over their parties’ electoral drubbing.

Following his own re-election in Witney, near Oxford, Cameron travelled to London to pay a visit to Buckingham Palace, where he was reconfirmed as prime minister by Queen Elizabeth II.

Bringing an end to five years of coalition government with the Liberal Democrats, he announced to reporters in Downing Street: “I will now form a Conservative majority government.”

Hours later he signalled continuity by reappointing the same finance, foreign, defence and interior ministers from his outgoing cabinet — George Osborne, Philip Hammond, Michael Fallon and Theresa May.

Cameron also named Chancellor of the Exchequer Osborne, seen as a potential leadership contender in future, as “first secretary of state” — an honorific title that effectively makes him his number two.

The election victory is an endorsement of the Conservatives’ austerity programme and is likely to see a continuation of cuts to public spending as they seek to reduce a budget deficit of nearly £90 billion (120 billion euros, $140 billion).

The pound rallied and stocks rose as investors welcomed a clear result and a government seen as more “business-friendly”.

But the election exposed deep political divisions and Cameron avoided triumphalism in his victory speech, promising to “bring our country together”.

He said he would deliver on manifesto pledges for the benefit of everyone in Britain, including a vote on the country’s membership of the European Union by 2017.

Cameron paid tribute to Labour leader Ed Miliband and his former deputy prime minister, Liberal Democrat leader Nick Clegg, both of whom stepped down Friday after a dismal result.

He also acknowledged the surge of the Scottish National Party (SNP), promising to give Scotland “the strongest devolved government anywhere in the world, with important powers over taxation”.

Scotland voted to reject independence in a referendum last September, partly after Cameron promised it new powers.

But the SNP came close to a clean sweep north of the English border in Thursday’s election, winning 56 out of 59 seats, up from just six in 2010.

“It is an extraordinary statement of intent from the people of Scotland. The Scottish lion has roared this morning across the country,” former SNP leader Alex Salmond said, as he was elected to the seat of Gordon.

Most of the gains were at Labour’s expense — in Paisley and Renfrewshire South, 20-year-old student Mhairi Black defeated Labour’s campaign chief, Douglas Alexander, to become Britain’s youngest MP since 1667.

Overall Labour lost 26 seats to finish on 232, a poor showing for which Miliband said he took “absolute and total responsibility”, before standing down as party leader.

It was also a terrible night for the centrist Liberal Democrats, who lost 49 of their 57 seats as voters punished them for entering a government with Cameron.

Clegg was re-elected but shortly afterwards resigned the party leadership, saying: “The results have been immeasurably more crushing than I could ever have feared.”

The election raises questions over Britain’s future in the EU, with Cameron confirming: “We will deliver that in-out referendum on our future in Europe.”

He has previously said he would campaign to stay in the bloc, provided he can secure changes to Britain’s terms of membership, notably on freedom of movement — although this has so far been met with resistance in EU capitals.

European Commission president Jean-Claude Juncker, whose nomination Cameron opposed, sent his congratulations saying he was ready “to strike a fair deal for the United Kingdom in the EU”.