But when it comes to the U.S. House, Republicans have dominated, winning 13 of the state's 18 seats in each of the last three elections. That came even though Democrats received more congressional votes in the state in 2012.



Plaintiffs in the case argued Republicans drew oddly shaped maps to make a handful of districts where Democrats would have huge electoral advantages and more where Republicans would be likely to win.



The plaintiffs contended that that diluted their voice and resulted in policies that don't represent Pennsylvania.



The main question in the case, which was tried last month, was legal: Is that kind of mapmaking permissible?



The plaintiffs' lawyers said the Elections Clause in the U.S. Constitution should be interpreted to mean states can't give either party an advantage.



One judge in the case, Michael Baylson, was convinced. He called gerrymandering "a wrong in search of a remedy" and said the Elections Clause provides that.



Lawyers for the main defendants, Republican legislative leaders, said there's no such provision.



"For the past several months, plaintiffs have made dozens of strained legal arguments against the map and the majority decision once again invalidated the plaintiffs' position," Senate President Pro Tempore Joe Scarnati, a Republican, said in a statement.



An appeal in the case would go directly to the U.S. Supreme Court.



Alice Ballard, a lawyer for the plaintiffs, said she and her clients were still processing the ruling and the one from North Carolina and considering their options.



A separate challenge to Pennsylvania's congressional map is pending before the state Supreme Court, which has scheduled oral arguments on the topic for next week in Harrisburg. Legislative Republican leaders on Wednesday filed documents in that case, arguing the Democratic voters who sued "are attempting to achieve through the courthouse what they could not in the voting booths."



Associated Press writer Mark Scolforo in Harrisburg, Pennsylvania, contributed to this report.