LONDON — Almost no one in Britain expected the electoral earthquake of May 2015. Twin shocks shattered expectations about the next government and left a yawning fissure across the United Kingdom.

The first was that David Cameron’s Conservatives won a majority in the House of Commons, after opinion polls had predicted a “hung Parliament.” The second was Scotland’s becoming a one-party state overnight, after the Scottish National Party took 56 of Scotland’s 59 seats in Westminster. The main victim was Labour, once dominant, now vanquished.

Labour’s unexpected collapse, under the leadership of Ed Miliband, was such that even if the party had held all its 41 Scottish seats (instead of losing 40 of them), it would have been doomed by its failure in England and Wales. Several motives drove Scots to desert Mr. Miliband’s party. It was not so much his policies; many of them were left-leaning enough to match Scotland’s tradition of state intervention and publicly funded welfare. Rather, it was a loss of faith in the Scottish Labour Party’s ability to fight for those policies.

The S.N.P. had more credibility after steadfastly blocking privatization of the National Health Service in Scotland through years when both Labour and Conservative governments were opening the English N.H.S. Scottish Labour, subordinate to its London headquarters, lacked the conviction to compete with the bursting confidence and energy of the S.N.P. as it promised to halt David Cameron’s austerity program and reverse his spending cuts.