LONDON — When Keir Starmer first emerged in early January as the front-runner to lead Britain’s Labour Party, the best he could hope for, it seemed, was to spend years in the political wilderness, opposing a Conservative prime minister, Boris Johnson, who won a landslide majority in Parliament.
On Saturday, Labour Party members elected Mr. Starmer to succeed Jeremy Corbyn as opposition leader, ending a contest against Rebecca Long-Bailey and Lisa Nandy that was long on process and short on suspense.
But the coronavirus crisis has upended the country since the election in December, making British politics — and Mr. Starmer’s new job — far less predictable.
Mr. Johnson is under intense pressure to curb the spread of the virus. He faces hard questions about the adequacy of the government’s testing program, as well as whether he had moved quickly enough to impose social distancing measures. And he has promised hundreds of billions of pounds to try to save a locked-down economy that is spiraling into a deep recession.
It will fall to Mr. Starmer to hold the government to account. If Britain weathers the pandemic reasonably well, Mr. Johnson will reap the dividends, making him even more politically impregnable. But if the prime minister is blamed for bungling the response, the Labour leader will have an opening to establish himself.
A former public prosecutor and human rights lawyer, Mr. Starmer is well qualified for this role, according to analysts. Unlike Mr. Johnson, he is detail-oriented and forensic in his approach. He lacks Mr. Johnson’s charisma, which would normally be a weakness but could work to his advantage during a crisis.
“We’re going to see a battle between charisma and competence,” said Tim Bale, a professor of politics at Queen Mary University in London. “These days, people seem to be buying competence and selling charisma.”
The downside is that Mr. Starmer will have to battle for visibility at a time when the coronavirus crisis is eclipsing all other news and Mr. Johnson is commanding the headlines. (The prime minister is in isolation with a fever after catching the virus.) And he will have a small fraction of the resources available to government ministers, who are backed by a powerful Civil Service.
There is a reason opposition leader is often described as the worst job in British politics.
The electoral math for Labour is daunting. Given the Conservative Party’s majority of 80 seats, it would take a political earthquake to bring Labour to power in the next elections, scheduled for 2024. For now, Mr. Johnson faces no realistic prospect of losing votes in the House of Commons.
Nor is history encouraging: The last opposition Labour leader to become prime minister was Tony Blair in 1997, and Mr. Starmer is not viewed as a political talent on Mr. Blair’s level (even if Mr. Blair is now reviled by many Labour members because of his role in the Iraq war).
Mr. Starmer cemented his reputation for being a bit dull when an interviewer recently asked him the most exciting thing he had ever done. “Oh, I’ve done lots of exciting things,” he replied. “Playing football, going to football with my kids.”
But having performed well as director of public prosecutions and shown he is fast on his feet in debates in the House of Commons, he has already passed one critical test that Mr. Corbyn, the departing leader, failed: looking like a potential prime minister.
Mr. Starmer’s competent, cautious political style equips him better than most for the task of fixing Labour’s bitter ideological divisions. Before the election, he proved his diplomatic mettle by nudging the party’s Brexit policy toward support for a second referendum, without ever falling out with Mr. Corbyn, who was never an enthusiast for that cause.
Colleagues trace Mr. Starmer’s diplomatic skills to his days as a human rights lawyer, when he represented clients from Caribbean countries who were appealing death penalty sentences in British high courts.
“If a country wants to keep the death penalty, telling them to abolish it is a difficult thing to do,” said Parvais Jabbar, co-executive director of the Death Penalty Project, who worked with Mr. Starmer on many of those cases. “He has an ability to confront and talk about these issues in a diplomatic, strategic way.”
Mr. Starmer could make some immediate changes to improve Labour’s image, for example, by taking a firm stance against anti-Semitism in the party’s ranks. By not repudiating the leftist agenda of the past five years, Mr. Starmer kept the support of Labour’s board members who still revere Mr. Corbyn but are weary of losing elections.
“Many of those party members have enjoyed the journey under Corbyn but not the destination, and now want a form of pragmatism,” said Steven Fielding, a professor of political history at Nottingham University.
Much will depend on events outside Mr. Starmer’s control. Mr. Johnson’s approval ratings have risen since the outbreak began and rise could further. But a prolonged economic downturn could end the prime minister’s political project.
Instead of spreading wealth to the north and middle of the country, as Mr. Johnson promised during the election, he could find himself having to borrow and spend huge sums simply to keep the economy afloat. Were unemployment to rise and disenchantment to grow, the Conservatives could face a backlash.
Mr. Johnson’s state intervention in the economy brings his policy closer to that of a Labour government than any Conservative one. That, too, could help Mr. Starmer, analysts said, by making Labour look more plausible as a governing party.
“For the next few years,” said Mr. Bale, of Queen Mary University, “he is arguably going to be playing on home turf rather than on the opposition’s turf.”