Keir Starmer, the leader of Britain’s Labour Party, nodded sympathetically as a young mother recalled, in harrowing terms, how she had watched closed-circuit television footage of the fatal stabbing of her 21-year-old son, whose heart was pierced with a single blow.

“Thank you for that,” a somber Mr. Starmer said to the woman and other relatives of victims of knife attacks, as they stood around a wooden table last week, discussing ways to combat violent crime. “It’s really, really powerful.”

It was not the most feel-good campaign event for a candidate the week before an election that his opposition party is widely expected to win. But it was entirely in character for Mr. Starmer, a 61-year-old former human rights lawyer who still behaves less like a politician than a prosecutor bringing a case.

Earnest, intense, practical and not brimming with charisma, Mr. Starmer finds himself on the cusp of a potential landslide victory without the star power that marked previous British leaders on the doorstep of power, whether Margaret Thatcher, the 1980s free-market champion, or Tony Blair, the avatar of “Cool Britannia.”

And yet Mr. Starmer has managed an arguably comparable political feat: Less than a decade after entering Parliament, and fewer than five years after his party suffered its worst election defeat since the 1930s, he has remade Labour with ruthless efficiency into an electable party, pulling it to the center on key policies while capitalizing on the failings of three Conservative prime ministers.