LONDON — When President Volodymyr Zelensky of Ukraine thanked British lawmakers for their solidarity in an emotional video address to the House of Commons on Tuesday evening, he singled out a particular member watching him raptly from the frontbench: Prime Minister Boris Johnson.
“I am very grateful to you, Boris,” Mr. Zelensky said.
It was an unaccustomed fillip of praise for Mr. Johnson, who has endured harsh questioning and withering criticism in Parliament in recent months for his role in various scandals, in particular the social gatherings at 10 Downing Street that breached coronavirus lockdown restrictions.
But the outbreak of war in Europe has quieted, at least for now, the uproar over illicit holiday parties. Mr. Johnson has tried to seize the mantle of a global statesman, staking out an early role in supplying Ukraine with lethal defensive weapons and pushing Western allies to impose more crippling financial sanctions on Russia.
The prime minister has put his relationship with the president at the heart of that effort. The two have spoken almost every day since Russian troops and tanks poured across the Ukrainian border. Mr. Johnson, a 57-year-old onetime journalist, and Mr. Zelensky, a 44-year-old onetime comedian and actor, have forged a rapport that officials said includes a healthy dose of humor, even amid the desperate circumstances.
“He’s identified that Zelensky is very much the man of the moment,” said Simon Fraser, a former head of Britain’s Foreign Office. “Politically, that is very astute. Boris has a nose for these things.”
Concentrating on Mr. Zelensky makes sense, Mr. Fraser said, because Britain, in the wake of Brexit, can no longer negotiate on behalf of the European Union with President Vladimir V. Putin of Russia. That difficult diplomacy has been led by President Emmanuel Macron of France. While Britain has engaged with Moscow, as have Israel, Turkey and other countries, Mr. Johnson has had comparatively little contact with Mr. Putin.
Britain’s highly visible backing of Ukraine, however, is a reminder of its role as an anchor of NATO and its track record of tough action against Russia. On the negative side, the crisis has shone a spotlight on London as a magnet for corrupt Russian money and the government’s unavailing efforts to clean it up so far.
Even so, said Peter Ricketts, a former British national security adviser and ambassador to France, “It was extremely convenient for Johnson to change the subject from the domestic controversies he’s been facing.”
Scarcely a month ago, Mr. Johnson faced the specter of a no-confidence vote by lawmakers in his Conservative Party. Now, even his fiercest critics concede that this is probably not the time to oust him. The leader of the opposition Labour Party, Keir Starmer, declined to repeat his call for Mr. Johnson to quit in a recent TV interview, saying that what was important now was to show unity over Ukraine.
“The public attention is elsewhere and the issues that were pre-eminent before and after Christmas are no longer,” said Robert Hayward, a polling expert who is a Conservative member of the House of Lords. “Because people’s attention is elsewhere, they are taking a different perspective.”
Slowly, the public anger over lockdown breaches in Downing Street seems to be cooling and Mr. Johnson’s dismal opinion poll ratings are ticking up. For the first time in months, news headlines have been dominated not by reports about B.Y.O.B. parties, but by a global crisis in which Mr. Johnson has played an active role in trying to resolve.
“We are definitely seeing the signs of a rallying-around-the-flag effect,” said Matthew Goodwin, a professor of politics at the University of Kent. Mr. Johnson, he noted, had weathered multiple crises during his time in office, turning some of them, like the pandemic, into opportunities.
“I think it’s a massive opportunity for him to redefine his premiership,” Mr. Goodwin said. “The question is whether he has the ability to do that, and the team in place, to make that a real thing.”
Forging an alliance with Mr. Zelensky was a natural impulse for Mr. Johnson. The two share a sense of the moment: In his speech to lawmakers, Mr. Zelensky quoted Winston Churchill’s famous never-say-die speech in the early days of World War II. Churchill happens to be Mr. Johnson’s hero, the subject of a biography by him.
Mr. Zelensky took Mr. Johnson on a tour of St. Sophia’s Cathedral when he visited Kyiv last month. The two bonded over dinner, officials said, discussing Shakespeare, the subject of another, as-yet unfinished, biography by Mr. Johnson. Then, in his speech to Parliament, Mr. Zelensky quoted Hamlet.
Ukrainians have voiced their gratitude to Britain in a recent poll, even if Mr. Johnson has deflected Mr. Zelensky’s plea for NATO to enforce a no-fly zone over his country. At home, Mr. Johnson’s ratings have improved because, as Mr. Hayward noted, “There is a benefit from being a leader standing up to someone like Putin.”
Russia-Ukraine War: Key Things to Know
Mr. Johnson’s political survival hinges on better polls, analysts say, because some of his lawmakers had concluded he was so damaged by the scandals that he had become a liability to the Tory’s electoral prospects.
Nonetheless, the issues that fueled a growing revolt against his leadership have not gone away. The Labour Party remains ahead in the polls, if more narrowly, and the police are still investigating whether Mr. Johnson broke his own lockdown laws by attending parties in Downing Street. He could be fined, which would be an extraordinary rebuke for a serving prime minister. .
Once that inquiry is complete, Mr. Johnson has promised to publish a full version of a report into the parties conducted by a senior civil servant, Sue Gray. Her findings were serious enough to trigger the police investigation and so are certain to be damaging.
Other troubles loom on the horizon.
Starting next month, Britons will be squeezed by a tax increase on top of rising interest rates, soaring inflation and a spike in energy costs. Those bills were already expected to double, even before the war sent the price of oil and gas skyrocketing. Against this stark economic backdrop, the Conservatives face local elections in May that could be another referendum on Mr. Johnson.
While the fortunes of some British leaders have improved during times of international tension, the lessons of history are ambiguous. Margaret Thatcher, for example, benefited hugely from the Falklands War in 1982 but was forced out of the prime minister’s job in 1990 during the hectic run-up to the Gulf War.
Even on Ukraine, Mr. Johnson’s record has been mixed. Experts credit Britain for its early support of Kyiv with weapons, its reinforcement of NATO’s eastern flank with troops and its pressure for punitive financial measures against Moscow.
But it got a slow start on sanctioning Russian individuals and institutions because its post-Brexit laws proved more complicated than many expected. It has also been criticized for its lack of generosity to Ukrainian refugees and its halfhearted action against Russian money and the oligarchs who have thrived among the London elite.
“We have this particular problem of the Russian oligarchs and London,” Mr. Fraser said. “We were not sufficiently rigorous in scrutinizing that early enough.”
Then, too, nobody can predict the course of the war or the state of European security by the time the parties scandal reaches its conclusion — or by the elections in May.
“We don’t know how these different series of events are going to work out,” Mr. Hayward said. “Is Ukraine going to dominate public attention for one week or for four, six or many more weeks? We don’t know.”