LONDON — The British government on Tuesday announced a Plan A and a Plan B for getting through the challenging autumn and winter months in the face of a stubborn pandemic driven by the highly contagious delta variant.

The hope is that Plan A will be enough. As part of it, the government will offer free booster shots to 30 million people to protect front-line health workers, those older than 50 and any other medically vulnerable people.

However, if the virus begins to spread exponentially and threatens to overwhelm hospitals during flu season, Plan B might be required. In that case, the government said, it was prepared to reinstate restrictive measures, including mandatory mask-wearing in crowded spaces and the use of vaccine passports to allow people to go to large events and nightclubs.

The news that booster shots are coming follows an announcement Monday night that the government would offer vaccines to all children ages 12 to 15.

Health Secretary Sajid Javid said the booster program would begin next week in England, with the rest of the country expected to quickly follow suit.

Speaking in the House of Commons, Javid said some of the emergency powers Parliament introduced in 2020 as Britain went into the first of its pandemic-induced lockdowns would be repealed. But others would be kept as part of Plan B.

This included contingency measures such as legally mandating face masks — a remark that prompted one Conservative lawmaker to cry out “No!” — and pressing people to work from home. Javid also said that although plans to introduce vaccine passports in October for large gatherings have been paused, “we will be holding that power in reserve.”

At news conferences from 10 Downing Street on Monday and Tuesday, Prime Minister Boris Johnson and his scientific advisers stressed that the pandemic was ongoing and that the coming months would be about “living with the virus” and “getting through the winter.”

Johnson said it was vital to get the remaining vaccine holdouts — about 5 million people — to come forward to get vaccinated.

The first booster shots will be offered at mass vaccination sites and will start with those in nursing homes and those over 80 before proceeding down through the age groups, health experts said.

Britain is the ninth country, including the United States, to announce a booster campaign. But its decision-making has been closely watched, since Britain has been conducting some of the most extensive studies on coronavirus boosters.

The government has been reviewing data from those studies as it devised its policy, though the findings have yet to be made public.

The booster will be given to those whose second dose of the two-dose regimen was at least six months ago. Britain will offer a full dose of the Pfizer vaccine or a half-dose of the Moderna vaccine as a booster. In the United States, the question of whether Moderna boosters should be given as full or half doses has delayed authorization.

Britain’s homegrown vaccine developed by Oxford researchers, in partnership with the pharmaceutical company AstraZeneca, will not be used here as a booster.

British health experts, citing ongoing studies about side effects and efficacy, said the messenger RNA vaccines — Pfizer and Moderna — appear a better option for a booster than the AstraZeneca shot.

“We all want a normal winter life,” said Deputy Chief Medical Officer Jonathan Van-Tam, but he cautioned that the world was still in an active phase of the pandemic and that the cold months could be “bumpy at times,” especially if this winter produces a bad flu season.

Other respiratory viruses are “highly likely to make their return,” he added, so the “aim of the game, the mantra if you like, is to stay on top of things.”

The World Health Organization has said that wealthy nations with large supplies of coronavirus vaccines should hold off on giving booster doses until more countries in the developing world can access first doses.

Medical experts advising the British government said offering boosters for those older than 50 — as opposed to the entire population — was a reasonable “middle way.”

Van-Tam said Britain’s vaccination program has helped stop 24 million covid-19 cases and averted 112,000 deaths. He also stressed that this was a “bespoke” booster campaign and was intended for this winter only.

Wei Shen Lim, a leader of the Joint Committee on Vaccines and Immunization, said evidence shows that vaccine efficacy especially wanes over time among people older than 50. He gave the example of a vaccine that was 90 percent effective in the weeks after a second dose at stopping symptomatic covid-19 but only 80 percent effective after six months.

That 10 percent decrease in protection might not sound like much for an individual, but at a broader population level, it could mean many thousands more hospitalized.

Infection rates in Britain are about 10 times as high today as a year ago. But deaths have plummeted as more than 80 percent of those older than 16 are protected by vaccines. The country is recording more than 100 coronavirus deaths a day, far lower than in January, when there were more than 1,200 coronavirus deaths a day.

On Monday, health officials confirmed that all children ages 12 to 15 will be offered a single dose of a coronavirus vaccine in England, discounting earlier advice that the shots were of only “marginal” medical benefit to youths.

Britain has lagged behind other wealthy countries, including the United States, which have been immunizing those 12 and older through most of the summer.

Just 10 days ago, Britain’s top vaccine task force recommended against vaccinating 12- to 15-year-olds, saying the shots were safe and effective but not really worth it for children and young teens, who rarely suffer from severe covid-19 but would risk very rare serious side effects from the vaccine.

The British chief medical officers said Monday that the risks to children were not only medical and that a vaccine would help protect them from the “massive impact” of missing classes, caused when teachers or students who test positive must isolate at home for 10 days or when schools — as they have in the past — are closed to in-person learning.

Chris Whitty, chief medical officer for England, said at a news conference that there was “extremely powerful evidence that disruption in education . . . has been extraordinarily difficult for children.”

Whitty stressed that the recommendation to offer vaccination was based only on what was best for the children and was not an attempt to protect parents, teachers or the wider society from infection.

The decision for England to begin giving single doses of the Pfizer vaccine at school — which is about 50 percent effective in protecting against symptomatic covid-19 — was confirmed by Nadhim Zahawi, the vaccines minister, to lawmakers Monday night.

As in the case of booster shots, Wales, Scotland and Northern Ireland are likely to follow in coming days.

Both children and parents will be asked to give consent, following a law established in the 1980s that gives competent young people a final say.