The 2015 British election will be remembered for much more than which party ran first in the overall voting. It will be known at least as much as the election that produced a seismic political shift in Scotland that changed the face of British politics.

Just eight months after ­losing a referendum to declare Scotland’s independence from the United Kingdom, the Scottish National Party (SNP) took all but three of the region’s 59 parliamentary seats.

A BBC exit poll released shortly after polling places closed projected that the party could end up with all but one of those seats. SNP leader ­Nicola Sturgeon reacted cautiously, tweeting: “I’m hoping for a good night but I think 58 seats is unlikely.”

In the end, the SNP ended up with a staggering 56.

The SNP’s surge in the wake of its September defeat has been the biggest surprise of this spring’s election, a development that has rocked the Labor Party in what long has been a traditional stronghold.

Labour Party leader Ed Miliband won reelection to parliament but conceded his party performed worse than members had expected. Exit polls suggest the Conservatives were clear winners at the Labour party’s expense. (Reuters)

So powerful was the SNP tide that among those swept away was Douglas Alexander, ­Labor’s shadow foreign secretary and campaign chief, who lost his seat to a 20-year-old student. Conceding defeat, Alexander said it is now Labor’s “responsibility to re-win the trust” that had obviously been lost.

Later, Jim Murphy, the leader of the Labor Party in Scotland, also lost his seat to the SNP. And an incredible 35-point swing toward the SNP cost Labor the seat long held by former prime minister Gordon Brown, who had decided to retire.

A confluence of events brought Scotland and the Labor Party to this moment, some reflecting long-standing problems within the party and others triggered by reaction in Scotland to the referendum campaign. Rather than contracting after losing the independence vote, the SNP was revitalized, with a sharply increased membership and an enthusiasm unmatched by the Labor Party.

During the independence referendum campaign, Labor made what appears to have been a costly decision to join the Conservatives and others in a cross-party effort to preserve the United Kingdom and defeat the movement to break away. To voters who want a Labor Party devoted to Scotland, the decision looked like a betrayal — a party in league with London that was no longer authentically Scottish.

“There was a feeling [in Scotland] of ‘they sold us out,’ ” said Peter Riddell, director of the ­London-based ­Institute for ­Government.

The second factor was the ­neglect of the Labor Party in Scotland by its national leaders, a ­disregard that has long stirred resentment. For years, talented Labor leaders from Scotland headed to London and the national government. The national party was looking to Scotland principally as a source of seats to buoy its strength in Parliament, rather than acting as an advocate for Scotland, analysts here said.

Meanwhile, the party in Scotland was atrophying, with membership declining sharply and its local organizations weakened by complacency. By this spring, it was clear that Labor in Scotland was a hollowed-out ­party with little muscle to wage an effective campaign. But that hollowing was two decades in the making.

“We had a false result in 2010 where people voted for [former prime minister] Gordon Brown because he was a Scot,” said Paul Sinclair, a former Labor adviser. “While the SNP consistently modernized and became a very modern professional outfit, the Labor Party just withered on the vine.”

The third factor has been the performance of SNP leader Sturgeon, who emerged as the undisputed star of the campaign this spring as she traveled around Scotland in a helicopter adorned with her photograph. She delivered strong performances in televised debates and forums. She also lacks the hard edges of former leader Alex Salmond, who was either loved or loathed.

Sturgeon vowed to push Labor Party leader Ed Miliband to the left on issues such as spending on the ­National Health Service and the future of the Trident nuclear program. Miliband insisted that he would not make a deal with the SNP, though he never ruled out using its votes to secure power. All that was put into question as the polls closed Thursday night.

Now the issue is how the SNP would operate as the third-largest party in Parliament in a government led by the Tories, given sharply different views on Scottish independence and Britain’s membership in the European Union.

What the SNP’s strength means for the future of the independence movement is another question. John Curtice, a professor of politics at the University of Strathclyde, observed on his blog Thursday that SNP success in the election does not constitute a significant rise in support for independence among the voters. On that issue, he said, opinions have not changed much since last fall.

“If the SNP do well in the election,” he wrote, “it will tell us as much about the workings of the first-past-the-post electoral system as it does about the balance of public opinion on the independence debate.”

In decisive vote, Scotland rejects independence

A new political order in Scotland threatens to upend the British election

Scotland’s political playing field returns to the realm of conventional politics