ON WEDNESDAY, a Pennsylvania judge upheld the state’s voter ID law, which requires residents to present photo identification at the polls. It’s estimated that hundreds of thousands of Pennsylvania voters — especially minority voters — lack the type of ID the law demands.

Of all the Republican-backed voter ID laws proposed since 2010, Pennsylvania’s is the one with the most demonstrable partisan motivation. All of these laws are bound to have a disproportionate effect on the poor and minorities, groups that contributed to President Obama’s victory in 2008. In Pennsylvania, this partisan advantage was boastfully acknowledged by Mike Turzai, the state’s House Republican leader: “Voter ID,” he said in June, “which is going to allow Romney to win the state of Pennsylvania — done.”

This unapologetically partisan legislation now has been legitimized in court. The result of Judge Robert Simpson’s ruling will be the disenfranchisement of some voters, though how many is a matter that can still be affected. Although he condemned the partisan noise around the law as “disturbing” and “tendentious,” Judge Simpson — echoing the Supreme Court’s 2008 ruling on a similar case in Indiana — said these concerns had little to do with the substance of the law. “The Commonwealth’s asserted interest in protecting public confidence in elections,” he wrote, “is a relevant and legitimate state interest sufficiently weighty to justify the burden.”

States have a valid interest in ensuring that voters are who say they are. But there’s no evidence that perception of voter fraud threatens “public confidence in elections.” And no wonder, since there is in fact virtually no fraud of the sort this law allegedly intends to confront, in-person impersonation. A recent analysis by News21, a national reporting project sponsored by the Carnegie-Knight initiative, investigated every case of reported voter fraud and concluded that the frequency of identity stealing at the polls is about one in 15 million. The burden of proof, then, ought be higher for lawmakers who seek to impose restrictions on the franchise.

The judge expressed a surprising amount of faith in Pennsylvania’s bureaucracy and its pledges to streamline the process of obtaining the necessary ID. We hope he’s right — and state officials have a responsibility to prove him right. But given the dubious motivation for the law, some skepticism is warranted.

Most frustrating is the legal Catch-22 the decision acknowledges. Judge Simpson didn’t deny that the law may place a burden on certain voters but said such a potential burden can’t be considered until the law takes effect. By the time challengers can prove harmful effects, some are likely to have been denied the right to vote.

An appeal is planned. The courts should act before voters are unnecessarily burdened in exercising their most fundamental democratic right.