A U.S. appeals court on Wednesday ruled that a Texas law requiring voters to show a government-issued form of photo identification before casting a ballot is discriminatory and violates the U.S. Voting Rights Act.

The U.S. Court of Appeals for the Fifth Circuit also sent the case back to a district court to examine claims by the plaintiffs that the law had a discriminatory purpose.

Critics of the law and others like it passed in recent years in Republican-governed states said such statutes are intended to make it harder for minorities such as African-Americans and Hispanics who tend to back Democrats to vote. Backers of these laws say they are necessary to prevent voter fraud.

The New Orleans-based Fifth Circuit asked the district court for a short-term fix to be used in Texas in the November general election.

“Therefore, to avoid disruption of the upcoming election, we rely on equitable principles in concluding that the district court should first focus on fashioning interim relief for the discriminatory effect violation in the months leading up to the November 2016 general election,” it said.

The U.S. Supreme Court in April rejected a bid to block the Texas law, but left the door open to a renewed challenge before the November elections.