EDINBURGH/LONDON (Reuters) - Scottish secessionist dreams of a swift second independence referendum were dashed on Friday when they lost 21 of their 56 seats to parties that want to keep the United Kingdom intact.

First Minister of Scotland Nicola Sturgeon addresses journalists in Edinburgh, Britain, June 9, 2017. REUTERS/Russell Cheyne

As Britain slipped closer to political deadlock after Prime Minister Theresa May’s disastrous gamble on a snap election, the losses by the Scottish National Party (SNP) undermined Nicola Sturgeon’s bid for a second independence vote.

Sturgeon’s party, which nearly swept the board in Scotland two years ago, lost heavyweights to a Conservative Party reinvigorated by Scottish leader Ruth Davidson.

Those losses included former leader Alex Salmond, who led Scotland in the unsuccessful bid for independence in 2014, and the SNP’s top lawmaker in the British Parliament, Angus Robertson.

“The union is safer than it was,” political commentator David Torrance said.

While the loss of seats pushes the issue of a second referendum onto a back burner for now, opinion polls show about 45 percent of Scottish voters support independence.

Sturgeon said it was “a disappointing result” for her party, two years after it won a landslide in Scotland, and admitted that the focus on independence was undoubtedly a factor in the poor result.

She has argued that last year’s Brexit ballot called the future of the United Kingdom into question because England and Wales voted to leave the European Union but Scotland and Northern Ireland voted to stay.

Sturgeon said she would now seek an alliance with like-minded parties to try to keep the Conservatives out of government and to keep both Scotland and the UK within the single European market as part of the Brexit talks.

“Last night it was shown that the reckless pursuit of a hard Brexit must be abandoned,” she said

“I’m appealing to (lawmakers) from all parties to join together to try to keep Scotland and the UK in the single market .. and bring some order to the negotiations.”

The SNP still took 35 of Scotland’s 59 seats in Britain’s 650-seat national parliament, while the Conservatives won 13 Scottish seats, achieving the second largest share of the vote. Labour won seven and the Liberal Democrats four.

All three nationwide British parties won just one seat each in 2015.

In the election campaign, the SNP sought to focus on Conservative austerity measures and Brexit, but the other parties hammered home the theme of stopping a second referendum.

Sturgeon appears to have erred badly on timing, after winning a mandate from the Scottish parliament for a second independence ballot by arguing that the Brexit result changed the rules of the game.

Rivals accused the SNP of setting aside day-to-day devolved government, including in health and education, to focus on splitting Scotland from England despite the rejection of independence by a 10-point margin almost three years ago.

Scottish Labour appears to have piggy-backed on the surge in support for UK-wide leader Jeremy Corbyn, who won over many voters with an unexpectedly strong campaign.

Scotland was the only good news for a Conservative Party that lost its overall majority in the British parliament.

“We had a very clear message in this campaign and there wouldn’t have been so many SNP losses tonight if Nicola Sturgeon hadn’t tried to force through an unwanted second independence referendum in March,” Ruth Davidson said.