The Supreme Court on Thursday night said Alabama does not have to abide for now with lower-court decisions that made it easier to cast a mail-in ballot in a state that has seen a spike in coronavirus outbreaks.

The vote was 5 to 4, with the court’s conservatives in the majority. Neither the majority nor the four justices who noted their dissent — Ruth Bader Ginsburg, Stephen G. Breyer, Sonia Sotomayor and Elena Kagan — supplied the reasoning for their votes in the short emergency order.

But in an earlier case from Wisconsin involving a judge’s accommodations for voters who feared voting in person because of the novel coronavirus, the justices in the majority — Chief Justice John G. Roberts Jr. and Justices Clarence Thomas, Samuel A. Alito Jr., Neil M. Gorsuch and Brett M. Kavanaugh — said it violated the court’s precedent about making changes to the voting process too close to an election.

The dissenters said the majority was ignoring the extraordinary impact of a pandemic.

Alabama is set to hold a primary runoff election July 14, after a delay caused by the virus. The state is one of many across the South experiencing a spike in the number of new cases reported daily.

A district judge in the state last month loosened the state’s strict requirements for casting a mail-in ballot in three counties where plaintiffs lived, including two that contain the state’s largest cities, Birmingham and Mobile. He also lifted the state’s ban on counties offering curbside ballot pickup, although he did not mandate they offer it.

“The court finds that the burdens imposed by the challenged election laws on voters at high risk of severe complications or death from COVID-19 are not justified by the state’s interests in enforcing the laws,” wrote Judge Abdul K. Kallon.

After a panel of the U.S. Court of Appeals for the 11th Circuit refused to put the order on hold, the state went to the Supreme Court.

When the state moved the election date, it also said that anyone who wanted a mail-in ballot could request one. But the state has one of the toughest requirements for casting the ballot in the nation, requiring that a notary or two witnesses sign voters’ absentee ballots and that voters send copies of their photo IDs with absentee ballot applications and certain absentee ballots.

The rules — particularly for sending copies of photo ID — “create nearly insurmountable barriers to exercising the fundamental right to vote amid the COVID-19 pandemic,” said a complaint filed by the NAACP Legal Defense and Educational Fund, which represented civil rights groups and individuals.

The state said it was not a great obstacle even for someone who has self-quarantined to ask masked neighbors to witness the application. But the courts in their orders mentioned dismissive comments of Secretary of State John H. Merrill when he was asked by a voter on social media how to comply with the photo ID requirement.

“When I come to your house and show you how to use your printer I can also show you how to tie your shoes and to tie your tie,” Merrill said. “I could also go with you to Walmart or Kinko’s and make sure that you know how to get a copy of your ID made while you’re buying cigarettes or alcohol.”

At the Supreme Court, Alabama argued that “rewarding plaintiffs by allowing them to lock in unmerited alterations of elections laws would be a bizarre application” of the court’s precedents against election-eve changes and “encourage more last-minute litigation and confusion.”

“We are deeply disappointed by the Supreme Court’s stay,” said Deuel Ross, senior counsel at the NAACP Legal Defense and Educational Fund. “Nonetheless, the litigation will continue, and we intend to seek relief for our clients and other voters in time for November.”

The case is Merrill v. People First of Alabama.