The Supreme Court has ruled broadly that parties can set their own internal rules, under the First Amendment right of association, and the court has struck down open primaries in Alaska, Washington and California that allowed voters to choose candidates from any party for any office.