A federal judge in Georgia ruled Thursday that the state must do more to protect the security of its elections and ordered that it no longer use its electronic-only system after 2019.

“This case arises in a technology context where Georgia’s current voting equipment, software, election and voter databases are antiquated, seriously flawed and vulnerable to failure, breach, contamination and attack,” wrote U.S. District Judge Amy Totenberg, who is based in Atlanta.

If Georgia cannot implement a recently approved voting system in time, the judge further ordered that the state must be prepared to return to an all-paper system, a move that she declined to mandate last year.

The lawsuit, known as Curling v. Raffensberger, was brought in 2017 by a voting-rights group, along with a handful of Georgia voters.“This is a big win for all Georgia voters and those working across the country to secure elections and protect the right to vote,” David Cross, the plaintiffs’ attorney, said in a statement. “The court ordered Georgia to finally take critical steps it has long refused to take to protect elections against interference and voters against disenfranchisement.”

Georgia is one of the few states that has electronic voting but does not produce paper receipts. According to a study released this week by the Brennan Center for Justice at New York University, South Carolina and Pennsylvania have committed to replacing their paperless systems by 2020.

In late July, Georgia Secretary of State Brad Raffensberger said in a statement that the new system would be in place in time for the March 24, 2020, presidential primary.

“Elections security is my top priority,” Raffensperger said. “We look forward to working with national and local elections security experts to institute best practices and continue to safeguard all aspects of physical and cybersecurity in an ever-changing threat environment.”

The case’s origins date to August 2016 when a cybersecurity researcher was able to quickly download a vast trove of Georgia’s election management data and materials.

In her Thursday ruling, Totenberg expressed her clear dissatisfaction with Georgia’s slow-moving pace.

“The imminent threats of contamination, dysfunction and attacks on State and county voting systems, disparaged by the Secretary of State’s representatives at the 2018 hearing virtually as a fantasy and still minimized as speculative at the 2019 hearing, have been identified in the most credible major national and state cybersecurity studies and official government reports,” she added.