Labour’s path back to power may be rocky, but the recent by-election result in Batley and Spen offers lessons for how it can be achieved. Congratulations must go to Kim Leadbeater, whose narrow victory prompted a surge of pride among Labour activists around the nation.

She fought an honest and decent campaign, but the contest was, at times, bitter. It will have been immensely difficult for her, coming five years after her sister, Jo Cox, was murdered in the constituency she represented. We should also remember the impact on Brendan Cox, husband of Jo, and their children.

Kim’s dignity throughout the by-election – when she faced down another nasty and opportunistic bid by George Galloway – provides a lesson to us all. There are also wider lessons to be learned for Labour. Our party wins when it sticks to its principles. Kim will be a voice for fairness and openness, just like Tracy Brabin, the recent MP who has become the inaugural mayor of West Yorkshire. And just like Jo Cox.

Kim fought a campaign that aimed to bring communities together in a culturally and ethnically mixed constituency. Kim had a strong campaign – open, inclusive and locally-focused. Her winning approach made me look back at Labour’s results on Super Thursday in May.

Yes, in many areas the results were not good enough, as we lost many hard-working councillors, as well as the parliamentary seat of Hartlepool. But we surprised the sceptics by winning all but two of the mayoral contests.

The lesson for me is that we must go forward with pride, positivity and principles. Labour is the UK’s largest party. We have almost 500,000 members and hundreds of thousands of activists among trade unions and affiliates. It is this strength in breadth and rich heritage, allied with localism, that can underpin our recovery.

We lost Hartlepool, a former steel town, due to a lack of regular engagement with local residents. I know from my time as a parliamentary candidate in West Bromwich East that communication and commitment is essential. Indeed, I have been in contact with residents there every week during the pandemic as I help to organise delivery of food parcels to charities and groups in need.

Hartlepool residents have felt the decimation of public services following a decade of austerity. We should have been able to convince voters that the reality of austerity – falling police numbers, fewer court rooms and the closure of hospital services – is directly and solely down to a cosy club of affluent Conservatives who run Whitehall. The downfall of Matthew Hancock, who indulged in secret Whitehall clinches with a university friend he appointed as a Department of Health adviser, is just the latest example.

It is the policy offer that must, however, ultimately finish off this government and inspire Labour to victory. We must stick to the positive approach of Batley and Spen, and of the metro mayoral contests. We must stick to a positive approach of energising our members, delivering party unity and, of course, organising communities around bread-and-butter issues: well-paid jobs; tackling crime, anti-social behaviour and the causes of crime; and making the case for investment in public services.

I believe Labour is the party to develop policies in all of these areas and shape the future of our country. To do so will mean changing our party structures – not modernisation as a message, but broadening our top team so it can better represent all nations and regions.

Our Labour MPs already work fantastically hard, and their time is split across Westminster and the constituency. I would like to see the creation of a new party co-chair and two deputy chairs who will be chosen from outside parliament and the national executive committee. The post-holders would be unpaid and draw on strong links with businesses, the self-employed and SMEs, BAME communities and trade unions to help us better reach all sections of society.

I hope Keir and his team will take this suggestion on board as he sows the seeds of recovery for Labour. At the same time, Labour must work with community groups, food banks, charities and solidarity campaigns to prove Labour is on your side. Labour has represented northern communities throughout its history – it can and will continue to do so again. Let’s rebuild our party, take power and then rebuild our country.