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.

Washington never held a primary under the new system because of legal challenges.

Writing for the majority, Justice Clarence Thomas said that overturning Washington's plan would have been an "extraordinary and precipitous nullification of the will of the people."

In dissent, Justice Antonin Scalia said Washington's system would cause a political party to be associated with candidates who may not represent its views. Scalia was joined by Justice Anthony Kennedy.

Under Washington's system, all candidates for a particular office may list their political party preference after their names.

Lawyers for the political parties said David Duke has identified himself as a Republican, despite GOP repudiation of his racial views, while perennial presidential candidate Lyndon LaRouche has called himself a Democrat, despite wide disagreement with Democratic leaders.

In his majority opinion, Thomas wrote that "there is simply no basis to presume that a well-informed electorate will interpret a candidate's party-preference designation to mean that the candidate is the party's chosen nominee" or that the party approves of the candidate.

Thomas added that "we cannot strike down" Washington's plan "based on the mere possibility of voter confusion."

The major parties challenged the law in federal court, asserting a First Amendment right to select their own nominees without outside interference.

The top-two plan was created after state voters approved a law in 2004 allowing them to pick their favorite candidate for each office. The top two vote-getters would advance to the November general election, even if they are from the same party.

A federal judge and the 9th U.S. Circuit Court of Appeals in San Francisco struck down the election plan.

Washington state Attorney General Rob McKenna argued there was no evidence that the parties would be harmed, since they can publicize through advertising and other means which candidates they support.

Tuesday's decision is the second of two this year on the rights of political parties. In New York, the justices said the state's method of electing trial judges, which gives party bosses effective control of the process, does not violate the Constitution.

The top-two plan was intended as the replacement for Washington's old "blanket primary," in which voters could vote for one party for governor and another party for the state legislature, for example.

The Supreme Court threw out blanket primaries, to which the political parties also objected, in a case from California in 2000. The Washington state government and the Washington State Grange have been sparring with the political parties ever since. The Washington State Grange advocates for farmers and has a long history of supporting populist ballot measures.

The cases are 06-713, Washington State Grange v. Washington State Republican Party, and 06-730, Washington et al. v. Washington State Republican Party.