HARRISBURG, Pa. -- A judge has ruled that Pennsylvania voters won't have to show photo identification to cast ballots on Election Day, a move that could help President Barack Obama in a presidential battleground state.

Tuesday's ruling comes just five weeks before the election. An appeal is possible. The 6-month-old law requires each voter to show a valid photo ID.

Democrats and groups including the AARP and NAACP mounted a furious opposition to a law Republicans say is necessary to prevent election fraud. Critics have accused Republicans of using old-fashioned Jim Crow tactics to steal the White House and have highlighted stories of registered voters struggling to get a state photo ID.

A top Republican lawmaker had boasted the law would allow GOP nominee Mitt Romney to beat Democratic President Obama in Pennsylvania.