The ruling will likely be appealed to the U.S. Supreme Court.