LONDON — The leader of Britain’s opposition, Keir Starmer, can often seem more like the technocratic human rights lawyer he once was than the no-holds-barred politician now reshaping the Labour Party with an eye toward making it more electable.

But as his former allies on the left wing of his party have discovered, appearances can be deceptive.

Mr. Starmer prompted a bitter rift recently when he banned his leftist predecessor, Jeremy Corbyn, from running as a Labour lawmaker, leaving the former leader claiming democratic procedures had been trampled and warning that his supporters were “not going anywhere.”

But beneath the ugly media brawl, the unceremonious purging of Mr. Corbyn was a substantive victory for Mr. Starmer, strengthening his already firm grip over the party. Three years after taking over, he has quietly but efficiently marginalized Labour’s once ascendant left-wing, enforced strict discipline over his top political team and grabbed control of the party machinery, including its selection of Labour candidates for Parliament.

“So far the processes that he has put in place have been utterly ruthless, and the left underestimated him,” said John McTernan, a political strategist and onetime aide to the former prime minister, Tony Blair.

The lesson for his enemies is perhaps not to mistake Mr. Starmer’s courteous and mild-mannered bearing — or absence of fanfare — for a lack of willingness to play political hardball.

“Keir Starmer is not narrating what he’s doing,” Mr. McTernan added. “He’s just doing it.”

Tom Baldwin, a senior adviser to another former Labour leader, Ed Miliband, agrees. “In his absolute determination to remove all obstacles to victory, Keir Starmer is more ruthless and competitive than any Labour leader I’ve ever seen,” he said.

He added: “Tony Blair had a very clear view about where he wanted to go, but did he chuck any of his predecessors out of the party? No.”

A spokesman for Mr. Starmer did not respond to a request for comment.

Under Mr. Corbyn’s leadership, Labour’s 2017 general election campaign scored an upset by depriving the prime minister at the time, Theresa May of the Conservative Party, of her parliamentary majority, signaling her political decline. At that zenith of his political career Mr. Corbyn, often likened to Senator Bernie Sanders of Vermont, basked in the adulation of enthusiastic young supporters, some of whom sang his name at the Glastonbury rock festival.

Two years later the bubble burst and Labour suffered its worst general-election defeat since 1935, while Mr. Corbyn’s leadership was tarnished by cases of antisemitism in his party.

There followed a highly critical report by the Equality and Human Rights Commission into Labour’s handling of antisemitism complaints. In 2020, when Mr. Corbyn claimed that the scale of the problem was “dramatically overstated” by opponents, Mr. Starmer suspended him from Labour’s parliamentary group, forcing him to sit as an independent.

It was at Mr. Starmer’s behest that Labour’s governing body, its National Executive Committee, completed the political purge of the former leader last month, provoking a surprisingly muted reaction from the party’s left wing that underscored its dwindling influence.

Jon Lansman, a founder of Momentum, a left-wing pressure group within the Labour movement, told Times Radio that Mr. Starmer “unfortunately is behaving as if he was some kind of Putin of the Labour Party. That is not the way we do politics.”

But asked if he would campaign for Mr. Corbyn were the former leader to run for election not as a Labour Party candidate but as an independent, Mr. Lansman replied: “No, I certainly wouldn’t. I want to see Keir Starmer elected as prime minister of this country, and we need a Labour government.”

Other internal critics have kept a low profile sensing that they, too, might fall victim to the purge. After all, Mr. Corbyn was not the first left-winger to be exiled to Labour’s equivalent of Siberia. In 2020, Mr. Starmer fired a lawmaker, Rebecca Long-Bailey, from his top team after she shared on Twitter an interview with Maxine Peake in which the actress claimed that the U.S. police tactics that killed George Floyd were learned from Israeli secret services.

The silence from internal critics spoke of the political transformation Mr. Starmer has achieved seemingly out of public sight.

Elected to Parliament in 2015, Mr. Starmer never adhered to the hard left of the party but nonetheless served in Mr. Corbyn’s top team and campaigned to make him prime minister.

When Mr. Corbyn quit as leader in 2019, Mr. Starmer straddled the internal factions, reassuring the left by arguing that Labour should not “oversteer” away from his predecessor’s agenda.

Mr. Corbyn’s supporters say that is exactly what Mr. Starmer has done, while other critics argue he has offered no vision to excite voters, seeming content to capitalize on the current Conservative government’s unpopularity.

But breaking with Mr. Corbyn, as part of a wider “detoxification” strategy, seems to have helped opinion poll ratings that now put Labour well ahead of the Conservatives.

National voting must take place by January 2025. With Mr. Starmer in a seemingly commanding position to become the next prime minister after four successive general-election defeats, Labour lawmakers have found a new discipline, reinforcing their leader’s authority.

For Mr. Starmer there are some dangers in purging his predecessor. Were Mr. Corbyn to run as an independent in the constituency in north London that he has represented since 1983 (including for more than a decade when Mr. Blair led the party), he might win. Even if he lost, Mr. Corbyn could attract media attention and distract from Labour’s wider campaign.

Another risk is that the party loses some of the young, enthusiastic supporters that Mr. Corbyn attracted.

James Schneider, a former aide to Mr. Corbyn, described Mr. Starmer’s approach as a “barefaced political attack on the ideas and social forces that were mobilizing to redistribute wealth and power in this country, and that came quite close to taking office” in the 2017 general election.

The assault on the left had, Mr. Schneider conceded, been “in a technical sense extremely effective and swift,” catching that wing of the party off guard, adding, “I don’t think anyone thought it would be quite so dramatic and quite so total as it has been.”

Such is the stifling control exercised by Mr. Starmer’s allies that only one candidate from the left has so far succeeded in dozens of Labour internal selections for parliamentary candidates, Mr. Schneider said.

Critics have accused the party leadership of fixing the process, weeding out candidates it dislikes with “due diligence” checks (claims it denies).

But ensuring that Mr. Starmer can rely on those elected on a Labour ticket could be critical if the next general election is close, and if the party wins a small majority.

Allies say Mr. Starmer’s uncompromising tactics have paid off. Mr. McTernan, the former Blair aide, described his hold over Labour as “undislodgeable,” adding that he has tight control over its lawmakers, the National Executive Committee and the shadow cabinet — Mr. Starmer’s top team.

“He also has the trade unions loyally lined up behind him, so it’s hard to know what else he needs to do,” Mr. McTernan said.