On a steep street near Barnsley town centre one afternoon recently, Dan Jarvis stood in the doorway of a terraced house and began his pitch. “If I get re-elected – ” he said, before being sharply cut off by the householder, who had a set of drill bits in his left hand and Mr Grumpy slippers on his feet.

“There’s no doubt about it, mate,” said Michael Wilcock, 43, a joiner. “You are going to be re-elected.”

Jarvis won the race for Barnsley Central in 2015 with a majority of 12,435 and though he is campaigning as if the seat were up for grabs – canvassing voters twice a day, six days a week – clearly it is not. Ukip and the Conservatives were second and third two years ago, but neither party seems to believe it has a chance of getting close. One reason is history: in this former mining town in South Yorkshire, loyalty to Labour runs deep. But another reason, perhaps the stronger one, is the man, the MP.

“I’m voting Labour because of Dan Jarvis,” said Valerie Richardson, 66, a retired health-care worker, one street down. “If I’m honest, I can’t say that I trust any of the others.”

The former paratrooper has earned his popularity here. After he won the seat in a by-election in 2011, Jarvis moved to Barnsley with his young family and soon established himself as a vocal and ubiquitous champion of the town. He also made an impression at Westminster. Before the 2015 general election, while discontent with Ed Miliband’s leadership was mounting, Jarvis was spoken of as a future prime minister. He considered standing for the Labour leadership after Miliband resigned but decided against it for family reasons.

With the sharp lurch of the party to the left, even as the electorate has drifted to the centre right, some of Jarvis’s Labour contemporaries have chosen to leave politics in the past few months. Tristram Hunt resigned to become the director of the Victoria and Albert Museum, Jamie Reed joined the nuclear decommissioning company Sellafield Ltd and Michael Dugher, the outgoing MP for the sister constituency, Barnsley East, started work in May as the chief executive of the industry trade body UK Music. But Jarvis says he “cannot think of anything else I would want to do”.

Like any good soldier, he has avoided criticising his commanding officer, Jeremy Corbyn, though their politics are very different: Jarvis is a centrist. That is not to say he won’t speak his mind on other issues. Jarvis campaigned strongly for Remain, but 68 per cent of Barnsley’s voters – many of them Labour supporters – chose Leave. Their voices need to be heard, he says.

“I’ve made it clear that immigration brings great benefits but we have to acknowledge that people have concerns about it. And what they don’t like is others looking down on them as racist for voicing these concerns.”

He himself has been sneered at. Writing in the Times in February, the columnist David Aaronovitch criticised the “rugged Labourite” for his comments about the need to address immigration, accusing Jarvis of “running scared”.

“I am not sure David has ever been to Barnsley,” Jarvis says when I ask him about the article. “Brexit provides an opportunity to manage immigration in a way that’s both sensible and fair. That’s what the majority of people want.”

What does Jarvis want, personally and professionally? To finish his memoir, for one thing. He has agreed a deal to write a book about the five years before he entered parliament, during which he served in Afghanistan while his wife was recovering from treatment for cancer. She died in 2010, aged 43, leaving two young children. Jarvis has since remarried and had a third child, a daughter who is now five.

“I don’t talk about that time much, and people have drawn their own conclusions,” he says. “For my own well-being it would be good to get it off my chest. It will be a gritty but uplifting account: the biggest of challenges – enduring, surviving.”

He won’t discuss whether he will stand if there’s another Labour leadership election soon. But it seems unlikely that he’ll be content to remain long as a backbencher with little influence over the wider party. His military background, personal story and experience as an MP – not long enough to be associated with the Blair years, not so short as to be seen as a neophyte – would make him a hard target for the Tories to attack. A YouGov poll in February showed that, out of 20 senior Labour MPs, he came top for “likeability”.

“There are big challenges for Labour to lead the debate on the future of this country, and I want to be part of that debate and to make a contribution,” he says. “I’m in it for the long run even though other people have deserted the field of play. I am not ­going anywhere.”

You can find the rest of our consituency profiles from the 2017 general election here.