A United States federal court has temporarily blocked an Ohio law that required proof of US citizenship from residents who wanted to register to vote while they obtained a driver’s license.

In his ruling on Tuesday, US District Judge Solomon Oliver Jr granted a preliminary injunction against the law, saying it likely violates the US National Voter Registration Act (NVRA) because it requires more information than necessary to determine a resident’s eligibility to vote.

“Election officials do not need documentary proof of citizenship to assess a voter registration applicant’s citizenship because signed attestation of citizenship is enough,” Oliver wrote.

The judge also pointed to a clause in the act that says each US state’s driver’s license application “shall serve as an application for voter registration with respect to election for Federal office unless the applicant fails to sign the voter registration application”.

Oliver said that Ohio must offer applicants the opportunity to register once they’ve submitted their driver’s license application, not after it’s been approved by the state’s Bureau of Motor Vehicles (BMV).

“To interpret this section of the NVRA otherwise would allow States to make registering to vote at the BMV more onerous, and could result in fewer voter registrations because the opportunity to apply was not proactively offered to otherwise eligible citizens,” Oliver added.

In 1995, Ohio passed a so-called “motor-voter” law that allowed residents the opportunity to register to vote when they applied for a driver’s license

But that law was amended last year by the state’s Republican-controlled legislature in an attempt to crack down on unproven claims, pushed in part by US President Donald Trump, that noncitizens were voting in the state’s election. US law prohibits noncitizens from voting in federal elections.

The ruling marks a victory for voting rights advocates like Red Wine & Blue, which sued Ohio’s secretary of state, Frank LaRose, over claims that the law disenfranchised eligible voters and violated the NVRA.

One of the group’s lawyers, Ben Stafford, praised the ruling, calling it “a win for Ohio voters.”

“With the registration deadline just weeks away, eligible Ohioans will now have the opportunity to register to vote at the BMV without having to produce unnecessary paperwork that is not required by federal law,” Stafford, an attorney at Elias Law Group, said in a statement.

LaRose said his office disagrees with the decision and will appeal.