HARRISBURG, Pa. (AP) — Some political momentum could be on the line when a judge rules on whether to keep intact Pennsylvania's tough new law requiring voters to show photo identification in next month's presidential election.

Commonwealth Court Judge Robert Simpson is under a state Supreme Court order to rule no later than Tuesday, just five weeks before voters decide whether to re-elect President Barack Obama, a Democrat, or replace him with Mitt Romney, a Republican.

Simpson heard two days of testimony last week and said he was considering invalidating a narrow portion of the law for the Nov. 6 election. An appeal to the state Supreme Court is possible.

Up for grabs are Pennsylvania's valuable 20 electoral votes, the sixth most. For now, Republican candidates are trailing in polls on the state's top-of-the-ticket races.

The law, opposed furiously by Democrats, has nevertheless been a valuable Democratic Party tool to motivate volunteers and campaign contributions as other critics, including the NAACP, AARP and the League of Women Voters, hold voter education drives and protest rallies.

In recent months, Republicans have sent out fundraising appeals highlighting legal challenges to the law or an inquiry into the law by Obama's Department of Justice, and the party no doubt would add a court defeat to its rallying cry.

The state's Republican Party chairman, Rob Gleason, insisted Monday that supporting the law is about good policy, not about motivating party voters. But then he criticized Democrats for opposing the law and for using it as an election issue.

Don Adams of the Philadelphia-area Independence Hall Tea Party Association said his membership of thousands is closely watching the issue.

"I think it'll drive our people even more, but I think they're already driven," Adams said. "I don't know how much more you can drive them."

Christopher Borick, a pollster and assistant professor of political science at Muhlenberg College in Allentown, said he would expect Republicans to use the law's defeat to warn of higher Democratic voter turnout and make it part of the case for why efforts to turn out Republican voters are essential.

Story continues

Pennsylvania's new law, among the toughest in the nation, is a signature accomplishment of Republicans in control of Pennsylvania state government who say they fear election fraud. But it is an emotional target for Democrats who call it a Jim Crow-style scheme to make it harder for their party's traditional voters, including young adults and minorities, who might not carry the right kind of ID or know about the law.

It was already a political lightning rod when a top state Republican lawmaker boasted to a GOP dinner in June that the ID requirement "is going to allow Gov. Romney to win the state of Pennsylvania."

The high court told Simpson that he should stop the law from taking effect in this year's election if he finds the state has not met the law's promise of providing easy access to a photo ID or if he believes it will prevent any registered voter from casting a ballot.

The injunction Simpson was considering revolves around the portion of the law that allows a voter without valid photo ID at the polls to cast a provisional ballot. It would effectively excuse those voters from having to get a valid photo ID and show it to county election officials within six days after the election to ensure their ballot will count. Instead, they might be required to submit a signed declaration to the county.

Last week, Simpson heard testimony about the state's ongoing efforts to remove bureaucratic barriers for people to get a valid photo ID. He also heard about long lines and ill-informed clerks at driver's license centers and identification requirements that made it harder for some registered voters to get a state-issued photo ID.