When Jeremy Corbyn won the leadership of the Labour party, he and close colleagues laid out a new strategy for electoral success. Rather than trying to compete with the Conservatives for the middle ground of British politics, he would seek to enthuse young voters and those who do not usually vote by putting forward a distinctive message. It was a strategy that was widely greeted with scepticism by many commentators who reckoned it was a pathway to disaster.

Meanwhile, things looked bleak indeed for Labour when Theresa May opted for a snap election on the back of a 16-point poll lead, which not long thereafter extended to a 20-point lead as the Ukip vote began to melt away. Yet, when the ballot boxes were opened, it was the prime minister who lost out; what was no more than a three-point lead proved insufficient for the Conservatives to retain any kind of majority at all.

This was despite the realisation of Conservative hopes that the party would benefit from the fall in Ukip support. In seats in England and Wales where Ukip was most successful in 2015 – and thus where its vote fell most heavily on Thursday – there was, on average, a small net swing to the Conservatives. Indeed, more broadly, the Conservatives did best in those constituencies where the vote for leave was strongest in last year’s referendum.

However, the other half of England and Wales swung strongly to Labour. Where Ukip was weakest two years ago, and where the leave vote was lowest, there was no less than a seven-point swing to Labour, including not least in London. In appealing to the Brexiters, May seems to have forgotten that she needed to carry with her the half of the country that voted remain.

The core of the remain vote comprised young, well-educated voters. And it looks as though the young voters that Corbyn was targeting, and whom the opinion polls suggested were swinging strongly behind Labour, did indeed turn out and support the party. The swing to Labour was rather higher in seats with most younger voters, as indeed was the increase in turnout. Meanwhile, where turnout went up, the swing to Labour tended to be higher, too. In short, all the signs are that Corbyn’s strategy delivered.

Up to a point, that is. There is a risk that, because the election result is being greeted through the prism of the widespread expectation that Labour would lose badly, it is forgotten that not only did Labour lose, but it did so almost as badly as in 2010, when Gordon Brown’s administration was ejected from power. Corbyn might have succeeded in persuading many voters that he was an effective party leader after all, but he has still not demonstrated that he can persuade enough to do so to be able to take his party to victory.

Meanwhile, there was one part of remain-voting Britain that did swing to the Conservatives – Scotland. However, there the central issue of the campaign was not Brexit but a debate about holding a second independence referendum. It has been a debate that has helped kickstart a Conservative revival that was fully in evidence on Thursday. The Conservatives won 29% of the Scottish vote, up no less than 14 points on 2015 and the party’s highest vote since 1979.

But the Conservatives’ ability to gain as many as a dozen seats north of the border was also reflection of a sharp 13-point drop in SNP support, together with the fact that the drop in SNP support was often highest in places where the party was strongest in 2015. The defeats inflicted on the former first minister, Alex Salmond, and SNP deputy leader, Angus Robertson, will have been a particularly heavy blow. Nicola Sturgeon may decide it would be wise to reconsider her proposed timetable for a relatively early second independence referendum, as well as pay more attention to the domestic record of her government in Edinburgh, a record that is increasingly being regarded unfavourably by voters.

The SNP was not the only party promising another referendum that performed relatively poorly. So also did the Liberal Democrats, in their case on the eventual terms of Britain’s withdrawal from the EU. But it did them little good in their attempts to reverse the serious defeat they suffered in 2015. On average, the party only did marginally better in seats where remain did best last year. Meanwhile, apart from Jo Swinson, Vince Cable and Ed Davey, the attempts of many former Liberal Democrat MPs to recapture seats they lost two years ago often simply resulted in even worse defeats. Now, question marks about the effectiveness of Tim Farron’s leadership would seem inevitable.