LONDON — In a tumultuous week for British politics, the contest to become leader of the centrist Liberal Democrats was doubtlessly the undercard, featuring two little-known lawmakers who disagreed politely and are not within a sniff of 10 Downing Street.
But despite being in the shadow of Boris Johnson, the Conservative Party firebrand, the new leader of the anti-Brexit Liberal Democrats, announced on Monday as Jo Swinson, a 39-year-old Scottish lawmaker, could nevertheless soon become a kingmaker in Britain’s topsy-turvy political scene.
Ms. Swinson’s victory drew far less notice than the Conservative leadership race, given that the next leader of that party, most likely Mr. Johnson, will also become prime minister. Voting among dues-paying Conservative members closed at the end of Monday, and the winner will be announced on Tuesday morning.
If Mr. Johnson prevails, he will inherit perhaps Britain’s greatest peacetime crisis — the vote to leave the European Union — as well as an escalating standoff with Iran. But he will have to navigate those crises with a razor-thin working majority in Parliament, and with fierce doubts eating away at support within his own party.
Conservative ministers have already started quitting in protest of Mr. Johnson’s hard-line pro-Brexit policies, with Alan Duncan, second-in command at the Foreign Office, resigning on Monday and predicting a meltdown by Mr. Johnson’s government in the fall.
The Liberal Democrats could be one of the beneficiaries.
They have been the loudest backers of a second Brexit referendum, an idea that has failed to command a majority but could become more viable if the bigger parties splinter and need the Liberal Democrats’ help holding power after a general election.
They also represent one part of an attempt by centrist liberals across Europe to confront the rising tide of populism on the left and right.
“In the face of nationalism, populism, the catastrophe of Brexit, the two old parties have failed,” Ms. Swinson said in her victory speech on Monday, referring to the Conservatives and opposition Labour Party. “Our party has been clear on Brexit from Day 1. We believe the U.K.’s best future is as members of the European Union.”
How Ms. Swinson might use resurgent influence by her party is an open question.
She has ruled out entering a formal coalition with Mr. Johnson or with the Labour leader, Jeremy Corbyn. But the next prime minister, confronted with no clear majority in Parliament for any Brexit option, may be forced to call an early election. And that could put the Liberal Democrats in position to offer their support to one of the larger parties in return for a promise to back a second referendum.
Ms. Swinson, who becomes the first leader of a major British party born in the 1980s, cast herself in the leadership race as a modernizer who could draw support from people of all ideological stripes. She defeated Ed Davey, a lawmaker from the greater London area, who emphasized his plans to fight climate change.
The Liberal Democrats have only a dozen lawmakers in the 650-seat House of Commons, and they are still distrusted by many on the left for their role in imposing crushing austerity measures after the financial crisis.
But they have revived themselves thanks to a wave of pro-Europe sentiment. They won the second-biggest share of the votes in European elections this spring, and recent polls put them neck-and-neck with other major parties in a hypothetical general election.
Labour continues to be riven by opposing factions over how openly to campaign for reversing Brexit, frustrating pro-Europe voters. The ascent of Mr. Johnson, an unwavering Brexiteer, could send some Conservative voters fleeing toward the Liberal Democrats, as well.
“I rage when Boris Johnson is more interested in sucking up to Donald Trump than standing up for British values of decency, equality and respect,” Ms. Swinson said on Monday. “Boris Johnson has only ever cared about Boris Johnson.”
Ms. Swinson will replace Vince Cable, a veteran politician who harnessed the Brexit backlash to lift his party out of obscurity.
On Monday, the Conservatives’ position grew even more tenuous.
Mr. Duncan, the Foreign Office minister who resigned, pushed for an emergency vote in the House of Commons on Tuesday to test whether Mr. Johnson could command the support of a majority of lawmakers. Mr. Duncan’s bid for the vote was rejected, but he warned that the government could collapse in the fall.
Another Conservative lawmaker, Charles Elphicke, was charged on Monday with three counts of sexual assault stemming from cases in 2007 and 2016. He was suspended from the party on Monday and will be forced to sit as an independent lawmaker.