LONDON — (TNS) British Prime Minister Boris Johnson on Monday survived the biggest challenge yet of his political career as he avoided being booted from office by his fellow Conservative Party lawmakers after months of outrage over boozy parties that he and his staff attended while the rest of the country was under COVID-19 lockdown.

The vote of confidence, which saw 211 of 359 Conservative members of Parliament express their support for keeping him as party leader and therefore as prime minister, means that Johnson — who has gained a reputation for an ability to rebound from controversy — is protected from further internal challenge to his leadership for at least another year.

But the narrow victory by British political standards, a month after an investigator’s report called out “failures of leadership and judgment” over wine- and gin-fueled parties at Johnson’s Downing Street office and residence in 2020 and 2021, leaves him in a weakened position, analysts say. The wounding came less than three years after Johnson celebrated leading Conservatives to one of their biggest election victories in decades.

“He survives, but how well does he survive?” said John Curtice, a politics professor at the University of Strathclyde in Glasgow, Scotland. “Did he win by enough to persuade colleagues to stay behind him?”

The previous prime minister, Theresa May, also temporarily avoided an early end to her term after surviving a no-confidence vote in 2018, only to see her authority among Conservative lawmakers tumble, forcing her to resign less than six months later.

Many Britons were disgusted when photos emerged around the beginning of the year of Johnson, his wife and some members of his staff snacking on wine and cheese in their garden in May 2020 with no social distancing, at a time when his government had ordered the country to go under pandemic lockdown. Johnson said he was simply attending a “work meeting.”

He was also forced to apologize for a raucous gathering held in Downing Street the night before the funeral of Prince Philip, Queen Elizabeth II’s husband. Critics contrasted the party culture in Johnson’s office with the image of the somber-looking queen sitting alone, according to the rules, at the funeral of her husband of more than seven decades.

In addition to the investigation and published report on the “partygate” scandal by a senior civil servant, Scotland Yard looked into the parties and issued more than 100 fines for breaches of lockdown rules. Johnson himself was fined 50 pounds (about $63), making him the first British prime minister to be sanctioned for breaking the law while in office.

Monday evening’s secret ballot of Tory lawmakers, which came after an extended holiday weekend during which Johnson was booed as he arrived at a church service honoring the queen’s 70-year reign, was announced in the morning by Conservative official Graham Brady, who said he had received letters from the required 15% of the party’s lawmakers asking for the vote.

“Tonight is a chance to end months of speculation and allow the government to draw a line and move on, delivering on the people’s priorities,” the prime minister’s office said in a statement ahead of the vote.

Even though he won the challenge to his leadership, one analyst said the fact that there was a vote will damage Johnson’s reputation.

“There were ministers of Parliament who were willing to tolerate the parts of Johnson that they did not like. But the culture of law-breaking became too much for some,” said Anand Menon, a politics professor at King’s College London.

The question around Johnson, Curtice said, has become whether his party and the public are “willing to believe him.”