Image copyright AP Image caption More than 13 million people in Texas were required to obtain ID to vote

Two US courts have struck down largely Republican-backed voter ID laws in Texas and Wisconsin just weeks before November's midterm elections.

Critics have argued the laws are illegal poll taxes on the poor, often racial minorities who lean Democratic.

The ruling could spare millions of registered voters in both states from being forced to acquire photo ID in order to cast their ballots.

The Texas Republican attorney general has vowed to appeal against the ruling.

Considered one of the harshest laws in the nation, the Texas law was previously derided by the US Department of Justice as blatant discrimination.

"We are extremely heartened by the court's decision, which affirms our position that the Texas voter identification law unfairly and unnecessarily restricts access," US Attorney General Eric Holder wrote in a statement. `

"We are also pleased that the Supreme Court has refused to allow Wisconsin to implement its own restrictive voter identification law."

Both laws were approved in 2011 and have become political flashpoints.

On Thursday, US District Judge Nelva Gonzales Ramosf ruled the Texas law "creates an unconstitutional burden on the right to vote, has an impermissible discriminatory effect against Hispanics and African-Americans, and was imposed with an unconstitutional discriminatory purpose".

Image copyright Getty Images Image caption Three of the US Supreme Court's nine justices dissented from the Wisconsin voter ID order

Texas Attorney General Greg Abbott's office has said it plans to appeal against he ruling, but until then the state will revert to election laws predating the 2011 voter ID law.

Also on Thursday, the US Supreme Court issued a one-page order blocking implementation of Wisconsin's voter ID law.

Three of the court's nine justices - Samuel Alito, Antonin Scalia and Clarence Thomas - dissented.

Following the ruling, Wisconsin Attorney General JB Van Hollen wrote in a statement he considered the law constitutional and "nothing in the Court's order suggests otherwise".

"It's a total victory on both fronts," Luis Roberto Vera, Jr, national general counsel for the League of United Latin American Citizens, told US media.

"You can call it the perfect storm against voter ID."

A day earlier, the US Supreme Court strengthened voter restrictions in North Carolina, where voters will not be allowed to do same-day registration during early voting .