An Arkansas judge struck down the state's new voter ID law on Thursday, saying it violates the state constitution by adding a requirement that voters must meet before casting a ballot.

Pulaski County Circuit Judge Tim Fox voided the measure in a lawsuit over the way absentee ballots are handled under the law. A separate lawsuit had been filed last week directly challenging the law, which requires voters to show photo identification before casting a ballot.

The law "is declared void and unenforceable," Fox wrote in the ruling.

The Republican-led Legislature approved the law last year, overriding a veto by Democratic Gov. Mike Beebe with a simple majority vote in the House and Senate. Backers of the measure said it was aimed at reducing voter fraud, while opponents said it would disenfranchise voters.

A spokesman for Attorney General Dustin McDaniel, a Democrat, says the state Board of Election Commissioners has asked McDaniel's office to appeal Thursday's ruling, and it will do so.

"We just received the Court's decision and are in the process of reviewing it. The State Board of Election Commissioners has already contacted us requesting an appeal and we will work as quickly as possible on the board's behalf to appeal this decision," Aaron Sadler, a spokesman for McDaniel's office, said in an email.

The American Civil Liberties Union of Arkansas, which had filed the separate lawsuit, hailed the ruling.

"The important thing is it indicates voters will be able to vote," Holly Dickson, the group's legal director. "It matters not which suit as long as voters will be able to vote."

The law, which took effect Jan. 1, was used in some local elections earlier this year, but it will be used statewide for the first time during early voting beginning May 5 and during primary elections on May 20.

Fox issued the ruling in a case that had focused on absentee ballots. The Pulaski County Election Commission sued the state Board of Election Commissioners for adopting a rule that gives absentee voters additional time to show proof of ID. The rule allows voters who did not submit required identification with their absentee ballot to turn in the documents for their vote to be counted by noon Monday following an election. It mirrors an identical "cure period" the law gives to voters who fail to show identification at the polls.

McDaniel issued a legal opinion in February in which he said absentee voters could not be given additional time to cast ballots, because that wasn't specified in the law. His opinion conflicted with advice that the Republican secretary of state's office had given to local election officials.

"The Pulaski County action forced the Court to reach the legal issues involved and strike down the voter ID law," said Chris Burks, a member of the Pulaski County Election Commission.

The Republican sponsor of the voter ID law said he was "shocked" at Fox's ruling, saying he didn't believe the judge gave the state the chance to defend the new measure.

"I thought today was about the rulemaking on the absentee ballots. It seems like he jumped ahead of himself," said Sen. Bryan King, R-Green Forest.

Thirty-one states have laws in effect requiring voters to show some form of identification, according to the National Conference of State Legislatures. Seven states have strict photo ID requirements similar to Arkansas. Voter ID laws have been put on hold in Wisconsin and Pennsylvania because of court challenges.

Under previous law, election workers were required to ask for photo ID but voters don't have to show it to cast a ballot. Under the new law, voters who don't show photo identification can cast provisional ballots. Those ballots would be counted only if voters provide ID to county election officials before noon on the Monday after an election, sign an affidavit stating they are indigent or have a religious objection to being photographed.

State Democrats indicated they planned to use the voter ID law as an issue in this year's elections, sending out a fundraising email within an hour of Fox's ruling.

"Don't let an appeal to this ruling turn back the clock for Arkansas voters," Candace Martin, the state party's executive director, wrote in the email.