Voting has now closed in two crucial by-elections in Labour’s traditional heartlands, with Jeremy Corbyn awaiting the result of his toughest electoral test to date.

The Labour leader is fighting to hold Copeland and Stoke-on-Trent Central in the face of strong challenges from both the Conservatives and Ukip, with the party leader Paul Nuttall contesting the latter. Both sets of results are expected in the early hours of Friday morning.

Early indications suggest Labour is braced for defeat in Copeland, with senior sources saying it was “neck and neck” and that “rural constituencies still come in likely to favour the Tories”. They were, however, “confident” of holding onto Stoke where turnout was 38 per cent – down on the 2015 general election.

The contests were triggered after the sitting Labour MPs Jamie Reed and Tristram Hunt – both persistent critics the Labour leadership – quit. Mr Hunt, a former Shadow Education Secretary, took up his role as the new director of the Victoria and Albert Museum in London earlier this week.

As the polls closed Mr Corbyn thanked those who campaigned for the party in the final hours and braved Storm Doris, which lashed parts of Britain with up to 94mph gusts. He added: “The political establishment has let down Copeland and Stoke, who have seen their industries gutted, living standards stagnate and hope for a better future for their children and grandchildren decline.

“Whatever the results, the Labour Party - and our mass membership - must go further to break the failed political consensus, and win power to rebuild and transform Britain.

With the party trailing in the nationwide opinion polls – the latest placing Labour behind Theresa May’s Conservatives by 18 points – the by-elections are also being viewed as a test of whether Mr Corbyn can reconnect with its traditional supporters in the wake of the Brexit referendum vote. It is likely Mr Corbyn will endure yet more questions regarding his leadership if the party fares badly.

Stoke voted overwhelmingly for Leave in the referendum – earning the nickname “Brexit Central” – and the Ukip believes it is potentially fertile ground for an electoral breakthrough.

However, Ukip has been hit by a series of setbacks, with Liverpudlian Mr Nuttall being forced to apologise for a false claim on his website that he lost “close friends” in the Hillsborough disaster. If the embattled party leader suffers a heavy loss in the constituency, it is likely his leadership will be called into question – just last week at Ukip’s spring conference in Bolton former leader Nigel Farage said the by-election was “fundamental” to the party’s future.

In pictures: Storm Doris hits the UK Show all 17 1 /17 In pictures: Storm Doris hits the UK In pictures: Storm Doris hits the UK A fallen tree brought down by high winds from Storm Doris lies across a main road in Isleworth in London, Britain Reuters In pictures: Storm Doris hits the UK Emergency personnel attend the scene in Cardinal Place, Victoria aftera man is thought to have been injured by a section of falling debris PA wire In pictures: Storm Doris hits the UK Commuters waiting at King's Cross Station in London, as flights have been cancelled and commuters were warned they faced delays after Storm Doris reached nearly 90mph on its way to batter Britain. PA wire In pictures: Storm Doris hits the UK A bin blown onto the tracks at Waterloo station in London, as flights have been cancelled and commuters were warned they faced delays after Storm Doris reached nearly 90mph on its way to batter Britain PA wire In pictures: Storm Doris hits the UK A car damaged by a tree which left two men injured, on the A49 north of Church Stretton in Shropshire PA wire In pictures: Storm Doris hits the UK The scene in Wolverhampton city center after a woman died when she was hit by a piece of roof the 'size of a coffee table' as Storm Doris has claimed its first victim PA wire In pictures: Storm Doris hits the UK A double decker bus blown onto its side by Storm Doris in Walton Highway near Wisbech, Cambridgeshire, as flights have been cancelled and commuters were warned they faced delays after Storm Doris reached nearly 90mph on its way to batter Britain PA wire In pictures: Storm Doris hits the UK A double decker bus blown onto its side by Storm Doris in Walton Highway near Wisbech, Cambridgeshire PA wire In pictures: Storm Doris hits the UK Spikes protude from a colourful umbrella as a woman struggles against the elements on the seafront at Seaham, in County Durham, north east England EPA In pictures: Storm Doris hits the UK ESB workers attend to power lines damaged by a fallen tree as allmost 46,000 Irish households woke up to no electricity after violent gusts battered large swathes of the country through the night PA wire In pictures: Storm Doris hits the UK A children's play area is crushed by fallen trees in Stoke-on Trent, as Storm Doris battered swathes of the country PA wire In pictures: Storm Doris hits the UK A plane comes in to land at Leeds Bradford Airport as flights have been cancelled and commuters were warned they faced delays after Storm Doris reached nearly 90mph on its way to batter Britain PA wire In pictures: Storm Doris hits the UK People make their way across Westminster Bridge while gusts of winds sweep across the capital in London EPA In pictures: Storm Doris hits the UK Queues outside Peterborough railway station after Storm Doris reached nearly 90mph on its way to batter Britain PA wire In pictures: Storm Doris hits the UK A tree which has fallen onto a van in St Anne's Road in Aigburth, Liverpool, as Storm Doris battered swathes of the country PA wire In pictures: Storm Doris hits the UK A rainbow over the Nottingham Wheel in the Old Market Square, as Storm Doris reached nearly 90mph on its way to batter Britain PA wire In pictures: Storm Doris hits the UK Waves crash over the lighthouse in Newhaven, East Sussex PA

There have been signs in recent days of growing confidence among Labour MPs that they will hang on in Stoke Central, which the party has held since it was created in 1950, despite a concerted challenge by Ukip. Momentum, the grassroots movement that grew out of Mr Corbyn’s leadership bid in the summer of 2015, has mobilised hundreds of activists in both constituencies and over 100 MPs are believed to have travelled to the constituencies on polling day alone.

But in the Cumbrian seat of Copeland, the bookies still make the Conservatives the narrow favourites to snatch victory. On Monday Mr Corbyn told the weekly meeting of the Parliamentary Labour Party (PLP) that the Copeland contest was on a “knife edge”. It came after the party suffered yet another dismal result in the poll, with researcher ICM placing Labour 18 points behind Theresa May’s Conservatives.