The Supreme Court on Tuesday upheld the state of Washington’s open primary election system, a setback for the Republican and Democratic political parties in the state.

By a 7-2 vote, the court says the state may use a primary system that allows the top two vote-getters to advance to the general election, even if they are from the same party.