THE 133rd Durham Miners Gala in early July was held beneath a sunburn blue sky, but Jeremy Corbyn on the balcony of the County Hotel looked cool in his cream suit as he beamed at the adoring crowds.

Practically every banner party stopped beneath the balcony to serenade him with a football-style chorus of “Oh, Je-rem-ee-cor-bin”.

The tuba player with the Coxhoe band turned the chant into a plodding bassline, which the drummer gradually speeded up until, with thousands clapping along in admiration, the trumpets tumbled in on the top with virtuoso trills – it was a marvellous improvised magnificat for a party leader who at the start of the year was so desperately unpopular with his own MPs he couldn’t fill his shadow cabinet and was so awfully unpopular with the country that he trailed Theresa May by 20 points in the polls.

A week before Mrs May surprised the nation by calling the snap election, Labour lost a council by-election in deepest Middlesbrough. Tom Blenkinsop, the Labour MP for Middlesbrough South and East Cleveland, said: “We lost due to the leader’s name being mentioned on the doorstep as the reason why residents were not voting Labour.”

Another North-East MP said the party leader was “bloody hopeless”, with “bloody” being a polite version of the word that was actually used. Corbyn was toxic.

During the course of the five week election campaign, Mr Corbyn enjoyed a remarkable turnaround in fortunes.

With Mrs May labouring woodenly in the spotlight, he made several nimble interventions, most notably a last moment decision to attend the BBC1 leaders’ TV debate, which magnified Mrs May’s absence.

His manifesto was left-wing and populist: the renationalisation of water, energy, railways and Royal Mail; abolition of student tuition fees; a ban on fracking; four new bank holidays. The Tories shouted “magic money tree” a lot, but failed to force Labour to explain the finances.

The proposals looked superficially attractive. A poll for a right-wing think-tank found 83 per cent of British people supported water re-nationalisation, and 76 per cent railway re-nationalisation. The lure to students is best seen in Durham City, where Roberta Blackman-Woods added nearly 1,000 to her majority, and Newcastle East, where Nick Brown added nearly 7,000.

Perhaps Mr Corbyn’s biggest appeal was that, unlike Mrs May the vicar’s daughter, he was the outsider – for much of his career, he had even been on the margins of his own party. He was the Trump figure, taking on the elite, tearing up the old certainties, appealing to a new audience, not needing to explain where £100bn comes from to scrap tuition fees any more than how you build a wall along a 1,900 mile border.

The old certainty was that you only win elections on the middle ground, but Mr Corbyn created new ground with the young and the marginalised.

But even though he pulled off an amazing turnaround, did he manage to make Labour great again?

Yes, the party won 40 per cent of the vote, its highest since 2001, an increase of 9.6 per cent on Ed Miliband’s failure in 2010, and it gained 30 seats.

But no. In a two horse race, Labour came second.

History may even suggest it was a missed opportunity. Mrs May was the worst campaigner in living memory. There were no distractions like Ukip or the Lib Dems. There was no real scrutiny of spending plans until the election was all but over. This could have been the shock of the century…

During the election there were two Labour parties – it was noticeable that Mr Corbyn flew from Middlesbrough South to Durham North West rather than set foot in the softer south Durham seats – but because of the good result, the whole party is, like the bands at the gala, playing from the same songsheet.

Part of this unity may be because of the pro-Corbyn pressure group Momentum which has a strong presence in many North-East constituencies unsettling the MPs who are not diehard loyalists. The youthfully exuberant Corbyn rallies now look and feel very different to the polished professionalism of those of the Blair years.

Whereas Mrs May must forever wear a tin hat to protect herself from incoming fire from her own party, Mr Corbyn’s biggest concern seems to be how he anoints his successor: will he pass his crown to Shadow Foreign Secretary Emily Thornberry or will he allow it to slip a generation to Rebecca Long-Bailey, Angela Rayner (who was on the balcony at the gala) or even North West Durham’s Laura Pidcock.

Yet for all this assuredness, we now live in a one issue era. Brexit. Politics is too unpredictable to make predictions, but it is certain that Brexit alone will dominate 2018.

But Labour is uncertain about Brexit.

Sir Keir Starmer, Labour’s Brexit spokesman, is forensic in his attention to detail, but there is no broader picture. Sir Keir wants “full participation of the single market” and “the full benefits of the customs union” which is neither in nor out, and on immigration he wants “easy movement, if not free” which is neither one thing nor t'other. Labour welcomed Mrs May’s phase one deal as it signalled a “soft Brexit”, yet in his heart of hearts, Mr Corbyn regards the EU as a capitalist club and he is a true Brexiteer.

Never mind a magic money tree, for much of 2017, Mr Corbyn has had a magic shield around him, making him immune to challenges and questions as he laps up applause from crowds from Glastonbury to Durham. Surely such sanctity can’t last as Brexit comes down to the nitty-gritty in 2018.