In a 5-3 vote, the Supreme Court shut down on Monday a Wisconsin federal court decision permitting absentee ballots to be counted up to six days after the election, so long as they had been postmarked by Election Day.

The decision came the same day Amy Coney Barrett was sworn in as the newest justice, cementing the court’s conservative majority.

Chief Justice John Roberts, Justices Neil Gorsuch and Brett Kavanaugh all wrote separate opinions highlighting the importance of not tampering with state election laws too close to an election.

About 30 states require absentee ballots to be received by Election Day to be counted. Three states, Ohio, Louisiana and Utah, require that the ballots are postmarked before Election Day. Most states requiring ballots to be received on Election Day mandate that the ballots arrive before polls close, usually around 8 p.m. local time.

Other states have varying rules of how late they will accept and count mail-in ballots, ranging from three days after the election to 23 days in Washington state.

A federal district judge in Wisconsin agreed that the coronavirus pandemic was reason for their Nov. 3 deadline to be extended by six days. A federal appeals court blocked the order, saying it violated Supreme Court precedent by changing the rules right before the election.

In his concurring opinion, Kavanaugh wrote that the court has “repeatedly emphasized that federal courts ordinarily should not alter state election laws in the period close to the election.”

In the dissent written by Justice Elena Kagan and joined by Justices Stephen Breyer and Sonia Sotomayor, the liberal justices argued that the court failed to protect voting rights.

“The Court’s decision will disenfranchise large numbers of responsible voters in the midst of hazardous pandemic conditions,” Kagan wrote. “As the COVID pandemic rages, the Court has failed to adequately protect the Nation’s voters.”

She noted that the Supreme Court permitted Wisconsin’s six-day extension in April, a period during which 79,054 ballots arrived and were counted, according to the Wisconsin Elections Commission.

The Wisconsin decision comes a week after the court ruled 4-4 that Pennsylvania could accept mailed ballots up to three days after Election Day. Roberts sided with the liberal minority on that case, and distinguished between the two in his concurring opinion on Monday.

“While the Pennsylvania applications implicated the authority of state courts to apply their own constitutions to election regulations, this case involves federal intrusion on state lawmaking processes,” Roberts said. “Different bodies of law and different precedents govern these two situations and require, in these particular circumstances, that we allow the modification of election rules in Pennsylvania but not Wisconsin.”