In a strongly worded decision, a state judge on Friday struck down Pennsylvania’s 2012 law requiring voters to produce a state-approved photo ID at the polls, setting up a potential Supreme Court confrontation that could have implications for other such laws across the country.

The judge, Bernard L. McGinley of Commonwealth Court, ruled that the law hampered the ability of hundreds of thousands of Pennsylvanians to cast their ballots, with the burden falling most heavily on elderly, disabled and low-income residents, and that the state’s reason for the law — that it was needed to combat voter fraud — was not supported by the facts.

“Voting laws are designed to assure a free and fair election,” the judge wrote in his 103-page decision. “The voter ID law does not further this goal.”

In addition, Judge McGinley ruled, the state’s $5 million campaign to explain the law had been full of misinformation that has never been corrected. He also said that the free IDs that were supposed to be made available to those without driver’s licenses or other approved photo identification were difficult and sometimes impossible to obtain.