TALLAHASSEE — After Florida and other states fought the plans, the U.S. Supreme Court on Thursday blocked a COVID-19 vaccination mandate for large employers, while clearing the way for a requirement that health-care workers get shots to try to curb the virus.

Justices issued two decisions, drawing distinctions between an Occupational Safety and Health Administration vaccination rule affecting employers with 100 or more workers and a separate rule that applies to hospitals, nursing homes and other health-care providers.

In a 5-4 decision, the court said the U.S. Department of Health and Human Services acted within its legal authority when it issued the vaccination mandate for health-care providers that participate in the Medicare and Medicaid programs. The decision granted a Biden administration request to stay preliminary injunctions that lower courts had issued against the mandate.

“COVID-19 is a highly contagious, dangerous, and — especially for Medicare and Medicaid patients — deadly disease,” the majority opinion said. “The secretary of Health and Human Services determined that a COVID-19 vaccine mandate will substantially reduce the likelihood that health care workers will contract the virus and transmit it to their patients. He accordingly concluded that a vaccine mandate is ‘necessary to promote and protect patient health and safety’ in the face of the ongoing pandemic. The rule thus fits neatly within the language of the statute. After all, ensuring that providers take steps to avoid transmitting a dangerous virus to their patients is consistent with the fundamental principle of the medical profession: first, do no harm.”

A challenge filed by Florida Attorney General Ashley Moody to the health-care rule has been pending at the 11th U.S. Circuit Court of Appeals, after a Pensacola-based federal judge refused to block the vaccination requirement. Moody, backed by Gov. Ron DeSantis, has argued that federal officials overstepped their legal authority and that the mandate would worsen health-care staffing shortages.

After Thursday’s ruling, the Florida Health Care Association, the state’s largest nursing-home industry group, expressed concerns about the effect of the vaccination requirement on staffing. The federal Centers for Medicare & Medicaid Services, which is part of the Department of Health and Human Services, issued the rule in early November, though court challenges delayed it from taking effect.

“We have always encouraged our members to continue working toward vaccinating as many residents and staff as possible,” Kristen Knapp, a spokeswoman for the Florida Health Care Association, said in an email. “However, long term care is experiencing a historic labor crisis. We are extremely concerned that the court’s decision to allow the CMS (Centers for Medicare & Medicaid Services) mandate to go forward will cause nursing homes to lose even more staff at a time when we are grappling with significant staffing shortages that are impacting access to care.”

The opinion was unsigned, but the court majority was made up of Chief Justice John Roberts and Justices Stephen Breyer, Sonia Sotomayor, Elena Kagan and Brett Kavanaugh. Justices Clarence Thomas, Samuel Alito, Neil Gorsuch and Amy Coney Barrett joined in a pair of dissents.

“These cases are not about the efficacy or importance of COVID-19 vaccines,” Thomas wrote in one of the dissents. “They are only about whether CMS has the statutory authority to force health care workers, by coercing their employers, to undergo a medical procedure they do not want and cannot undo. Because the government has not made a strong showing that Congress gave CMS that broad authority, I would deny the stays pending appeal.”

The court, however, voted 6-3 to block the OSHA rule, which targeted employers with 100 or more employers. The rule called for workers to be fully vaccinated against COVID-19 or test negative at least once a week and wear masks.

Florida, Georgia and Alabama filed a challenge to the rule in November, with that case later consolidated with other challenges at the 6th U.S. Circuit Court of Appeals. The Ohio-based appellate court allowed the rule to move forward, but the Supreme Court on Thursday placed a stay on the rule.

Florida Chief Financial Officer Jimmy Patronis praised the Supreme Court decision in the OSHA case.

“I came up in the restaurant industry,” Patronis said in a Twitter post. “I know how tight margins can be and how hard it is to hire and retain employees. The Biden vaccine mandate hurt small businesses and I’m glad the Supreme Court dealt him a big loss today. It’s a win for our state, country and FREEDOM!”

Biden issued a statement that expressed disappointment in the OSHA ruling, saying it is now up to states and “individual employers to determine whether to make their workplaces as safe as possible for employees, and whether their businesses will be safe for consumers during this pandemic by requiring employees to take the simple and effective step of getting vaccinated.”

The court majority in the OSHA ruling was made up of Roberts, Thomas, Alito, Gorsuch, Kavanaugh and Barrett. Breyer, Sotomayor and Kagan dissented.

“Although Congress has indisputably given OSHA the power to regulate occupational dangers, it has not given that agency the power to regulate public health more broadly,” the majority opinion said. “Requiring the vaccination of 84 million Americans, selected simply because they work for employers with more than 100 employees, certainly falls in the latter category.”

But a dissent said the majority opinion “seriously misapplies the applicable legal standards. And in so doing, it stymies the federal government’s ability to counter the unparalleled threat that COVID-19 poses to our nation’s workers. Acting outside of its competence and without legal basis, the court displaces the judgments of the government officials given the responsibility to respond to workplace health emergencies.”

Jim Saunders is a reporter for News Service of Florida