A Florida judge Friday afternoon upheld Floridas new Fair Districts redistricting law, according to The Palm Beach Post, protecting a law that could help Democrats pick up some House seats in the state.

The law is written to fight gerrymandering in the state by forcing lawmakers to draw districts based on communities rather than where politicians live or what political direction they would lean.

Republicans have unified control of state government in Florida and currently hold 19 of the states 25 U.S. House seats on a map they drew to their advantage a decade ago. If they have to follow the new law it will make it hard for them to protect all of their incumbents, especially Rep. Allen West (R-Fla.), who is in a district that is gerrymandered to be as Republican as possible. Democrats are likely to pick up a few seats.

Florida Reps. Mario Diaz-Balart (R) and Corrine Brown (D) and the Republican-controlled State Legislature brought the lawsuit. While most Democrats strongly support the law, which passed by referendum last election, Brown is concerned that following the law could radically alter her African-American-majority district, putting her into a tougher race than she has faced in the past.

Those opposing the law vowed to appeal it all the way to the U.S. Supreme Court, if necessary. But should the law stand it will likely help Florida Democrats pick up some congressional seats, making it more likely they can retake the House majority next year.