WASHINGTON (AP) — President Joe Biden’s administration has been working for months to prepare people to rethink their personal risk calculations as the nation gets used to the idea of living with an endemic COVID-19.

But that measured approach disappeared abruptly when a federal judge on Monday threw out the federal requirement to mask up when using mass transit. The ruling added to the urgency of the messaging challenge as the administration tries to move past the virus in the lead-up to midterm elections.

After the government last month eased indoor mask-wearing guidelines for the vast majority of Americans – even in schools — masking on planes was one of the last redoubts of the national COVID-19 restrictions. Now, as the policy falls, the administration turns to accelerating its efforts to provide the best advice for millions making their own personal safety decisions in the still-dangerous pandemic.

It’s both a public health imperative and an important shift in emphasis for Biden’s political future.

“There is an opportunity now, instead of saying this is a disappointing ruling, they could say this is a good time to have a conversation about how we move forward in this pandemic about risk calculation,” said Dr. Amesh Adalja an infectious disease physician and a senior scholar at the Johns Hopkins Center for Health Security.

“With COVID-19, I think we’re at a point with immunity from prior infections, vaccines, home tests and treatments that we can start to manage this the way we manage other infectious diseases,” he said.

Biden himself went all-in on flexibility Tuesday when asked if Americans should mask up on planes.

“That’s up to them,” Biden declared during a visit to Portsmouth, New Hampshire. But his own White House nonetheless continues to require face coverings for those traveling with him on Air Force One, citing guidance from the Centers for Disease Control and Prevention.

The shift toward less formal regulation was actually previewed in a 100-page plan released by the White House coronavirus response team in February. Back then, administration officials had hoped that children under 5 would be eligible for vaccination by now — a move that would have eased the concern of millions of parents and provided the umbrella of protection to nearly everyone in the U.S. who wanted it.

Monday’s court order lifting the mask mandate came at a crossroads in the nation’s pandemic response, just shy of a year to the day from when all American adults were eligible for vaccination against COVID-19. The ruling sent government agencies and the White House scrambling to comply, but that didn’t stop momentary confusion among travelers as airlines and airports dropped their mask requirements — in some cases mid-flight.

The administration stressed that Americans should still comply with CDC recommendations to wear face coverings, even in the absence of the mandate. Biden’s press secretary, Jen Psaki, said as much just an hour before his “up to them” comment.

“The CDC continues to advise and recommend masks on airplanes. We’re abiding by the CDC recommendations, the president is, and we would advise all Americans to do that,” she said.

On Tuesday, Justice Department spokesman Anthony Coley said officials believe that the federal mask order was “a valid exercise of the authority Congress has given CDC to protect the public health.” He said it was “an important authority the Department will continue to work to preserve.”

But he said the department would only appeal the ruling if the CDC determined that the mask mandate was still necessary for public health. As of Tuesday evening, the agency hadn’t made a determination, officials said.

Psaki on Tuesday indicated that while the administration was disappointed with the ruling, it didn’t rank with Congress’ inability to reach a compromise on additional COVID funding to purchase booster shots and antiviral treatments.

“Those are our biggest concerns,” she said.

Face-covering requirements, which have proven to lower the risks of infection, have grown increasingly political in the U.S. over the last year, particularly as cases and severe outcomes have fallen.

The lingering mandate for public transit and air travel served as a daily reminder for many people that the pandemic they badly wanted to be over was still affecting their lives, even if vaccinations and antiviral treatments had dramatically lowered their risk. For others who are still fearful of the virus, each roll-back of pandemic restrictions has sparked fresh disquiet — and in some cases criticism of the Biden administration.

“There are still a lot of people in this country who still want to have masks in place — either they have immunocompromised relatives, they have kids under 5, whatever it may be,” said Psaki.

Monday’s court ruling hastened an outcome that was likely coming in weeks anyway. Many administration officials believed that last week’s 15-day extension of the mask order to May 3 would be the last. The public health agency had asked for the additional time to monitor whether a recent rise in infections would result in increased hospitalizations or deaths. So far it hasn’t.

The court’s order caught the administration by surprise and left it struggling to grasp its impact — both on the requirement’s end and on CDC’s authorities going forward.

“CDC scientists had asked for 15 days to make a more data-driven durable decision,” Dr. Aashish Jha, the new White House COVID-19 coordinator, tweeted on Tuesday. “We should have given it to them.”

The uptick in cases and a recent spate of positive cases in Biden’s orbit — including second gentleman Doug Emhoff and House Speaker Nancy Pelosi — was a potent reminder that the virus isn’t going away.

Biden, 79, was never identified as a “close contact” under CDC guidelines, the White House said, and officials emphasized that he is strongly protected against the virus by being vaccinated and twice-boosted.

Controlling the virus that has killed 986,000 Americans has been a priority for Biden since taking office. The U.S. now averages about 35,000 confirmed cases per day, down from a high of more than 806,000 during January’s omicron surge, but up slightly from lows of about 26,000 a month ago. Those figures are surely an undercount since many people don’t report the results of at-home tests to public health authorities.

___

AP writers Chris Megerian in Portsmouth, New Hampshire and Michael Balsamo in Washington contributed.