A Michigan judge has ruled that mail-in ballots postmarked by election day must be counted if they are received up to 14 days later.

Michigan Court of Claims Judge Cynthia Diane Stephens issued a preliminary injunction on Friday, arguing in a 21-page filing that recent events have rendered the statutory deadline for mail-in ballots unconstitutional. The state Supreme Court of Pennsylvania issued a similar ruling on Thursday.

“In light of delays attributable to the COVID-19 pandemic, mail delivery has become significantly compromised, and the risk for disenfranchisement when a voter returns an absent voter ballot by mail is very real,” Stephens wrote, according to The Detroit News.

The decision is a victory for Democrats across the state and a blow to Republicans and the Trump campaign which argued for more restrictions on mail-in ballots. The ruling means campaign officials will continue to accept mail-in ballots postmarked by election day for two weeks following the election.

Stephens cited 6,400 ballots received after the state’s Aug. 4 primary that were discarded because they were late as evidence that the current framework of election security laws were burdensome and effectively disenfranchised voters amid the pandemic.

“Where the current state of affairs has riddled that option with uncertainty after uncertainty, the Court concludes that the 8:00 p.m. ballot receipt deadline unnecessarily curtails the self-executing right to vote by absent voter ballot and to return that ballot by mail,” Stephens wrote. “Applying the strict, 8:00 p.m. ballot receipt deadline on absent voter ballots imposes too great a restriction for the upcoming general election. Some flexibility must be built into the deadline in order to account for the significant inability of mail to arrive on what would typically be a reliable, predictable schedule.”

Attorneys for the GOP argued that the extended two-week window to accept ballots, and other similar proposals, will delay election results and increase the likelihood of voter fraud, according to The Washington Post. Michigan has outlawed the practice known as ballot harvesting, campaign workers or activists gathering completed absentee ballots from voters.

“The documentary evidence in this case reveals that the incidences of voter fraud and absentee ballot fraud are minimal and that the fears of the same are largely exaggerated,” Stephens added.

The decision comes in a critical swing state that President Trump won by a slim margin of just 0.3% of the vote in 2016. A tight presidential race and a hold on Michigan’s election results could delay a winner being declared in the 2020 presidential election for up to two weeks.

On Thursday, Pennsylvania’s Supreme Court issued a ruling in another victory for Democrats seeking to bolster the mail-in vote, which heavily favors Democratic candidates. The court ruled that ballots received within three days of election day should be counted. The court decision came after a difficult primary in which a flood of mail-in ballots delayed election results in some races for weeks.