ST. PETERSBURG, Fla. (AP) — A pilot declared over the loudspeaker on a cross-country Delta Air Lines flight that passengers were no longer required to wear masks, eliciting cheers from the cabin and prompting some on board to immediately toss their face coverings onto their seats.

“Feel free to burn them at will,” a train conductor told New Jersey commuters Tuesday. Other passengers were confused, startled and angered by the abrupt change, however, especially those who booked trips in the belief that their unvaccinated children would be traveling in a masked environment.

A federal judge’s decision Monday to throw out a mask requirement on public transportation did away with the last major vestige of federal pandemic rules and led to a mishmash of new locally created rules that reflected the nation’s ongoing division over how to battle the virus.

Major airlines and airports in places like Dallas, Atlanta, Los Angeles and Salt Lake City quickly switched to a mask-optional policy. New York City, Chicago, Los Angeles and Connecticut continued to require them on mass transit. But a host of other cities ditched their mandates, even though the Centers for Disease Control and Prevention continued to recommend masking on transportation.

Brooke Tansley, a television producer and former Broadway performer, boarded a flight with her 4-year-old and 8-month-old baby— neither old enough to be vaccinated — only to learn that the mask mandate had ended mid-flight.

“Here we are, trapped in the sky with our 8-month-old unmasked baby (you can’t actually mask a baby that young) under the supposition that everyone who can be masked would be masked, and the flight 325 crew has taken our choices away from us,” she said in a tweet. “Very very angry about this.”

For many, though, the news was welcome. A video showed some passengers on a Delta Air Lines flight cheering and applauding as they took off their masks upon hearing the announcement they were now optional. One man could be seen happily twirling his mask on his finger.

On a Southwest Airlines flight Monday from Detroit to Nashville, the change to optional status was incorporated into the safety announcements, prompting murmurs and fist pumps from some passengers and no audible complaints.

In Portland, Oregon, transit employees were immediately working on taking down “mask required” announcements and signs, but said it would likely take several days to remove everything.

The city joined Atlanta, Philadelphia, Washington, D.C., Kansas City, Missouri, and two of Alaska’s largest cities, Anchorage and Juneau, in making masking optional on mass transit.

“We know our riders have mixed feelings about the mandate ending,” Portland’s public transit agency, TriMet, posted on social media. “We ask everyone to be respectful of others as we all adjust to this change.”

Some passengers at Chicago’s Union Station said the rules were confusing. Both Amtrak and Metra, the regional commuter rail service, said masks still are required, but some passengers walking through the station didn’t wear them.

“It’s like this patchwork of different rules and enforcement of it,” said Erik Abderhalden, who wore a mask as he waited for a Metra train to his home in suburban Naperville. “I mean, it’s like Swiss cheese … there’s no uniformity and it seems pretty laissez faire.”

The Chicago Transit Authority also said it still will require masks on city trains and buses, for now.

Subway rider Cooper Klinges was pleased that New York City’s public transit system wasn’t following the trend and planned to keep its mask requirement in place. As he waited at a train station in Brooklyn, New York, he said he canceled a flight earlier this year over concerns about the virus.

“I don’t think we are out of the woods yet,” said Klinges, a teacher, citing concerns about the BA.2 omicron subvariant of the coronavirus. “It is still around. We have to still stick it out.”

The ride-sharing companies Lyft and Uber announced on their websites Tuesday that masks will now be optional while riding or driving.

The national mask rule for travelers was one of the last of the pandemic restrictions still in place. It sparked online flame throwing between those who felt they were crucial to protecting people and those who saw it as an unnecessary inconvenience or even government overkill.

Some flight attendants found themselves cursed and even attacked by passengers who refused to comply.

In a 59-page lawsuit ruling, U.S. District Judge Kathryn Kimball Mizelle in Tampa said the U.S. Centers for Disease Control and Prevention overstepped its authority in issuing the original health order on which the TSA directive was based. She also said the order was fatally flawed because the CDC didn’t follow proper rulemaking procedures.

The Justice Department declined to comment when asked if it would seek an emergency stay to block the judge’s order.

While airline and mass transit passengers around the country were ditching masks, the White House made clear that those traveling with President Joe Biden to New Hampshire on Tuesday would be required to keep face coverings on “in line with CDC guidance.” A Biden administration official also said there were no changes expected to the pre-departure testing requirement for international passengers bound to the U.S.

Asked Tuesday if people should still wear masks on planes, Biden replied: “That’s up to them.”

The CDC had recently extended the mask mandate, which was set to expire Monday, until May 3 to allow more time to study the BA.2 omicron subvariant now responsible for the vast majority of cases in the U.S. But the court ruling puts that decision on hold.

After a winter surge fueled by the omicron variant that led to record hospitalizations, the U.S. has seen a significant drop in virus spread in recent months that led most states and cities to drop mask mandates.

But several Northeast cities have seen a rise in hospitalizations in recent weeks, leading Philadelphia to bring back its mask mandate.

The federal mask requirement for travelers was the target of months of lobbying from the airlines, which sought to kill it. The carriers argued that effective air filters on modern planes make transmission of the virus during a flight highly unlikely. Republicans in Congress also fought to kill the mandate.

“We are relieved to see the U.S. mask mandate lift to facilitate global travel as COVID-19 transitions to a more manageable respiratory virus — with better treatments, vaccines and other scientific measures to prevent serious illness,” Delta announced in a news release.