Less than a week after the Centers for Disease Control and Prevention extended the requirement, a federal judge in Florida struck it down.

The judge said that the mandate violated the procedures required for agency rule making under the A.P.A.

A group called the Health Freedom Defense Fund filed a lawsuit in the state of Florida.

She declared the mandate to be invalid and shut it down. It was not clear if the Justice Department would appeal her order. It could ask the judge or appeals court to stay the order so that the C.D.C. could continue to enforce it.

Noah and Charlie contributed to the report.