Updated

Seattle’s controversial tax on the wealthy failed its first legal test this week after a judge ruled the new ordinance violates state law – but the city isn’t backing down and vows to appeal, setting the stage for a Washington State Supreme Court showdown.

King County Superior Court Judge John Ruhl ruled in a Wednesday that Seattle did not have the authority to impose the tax because state law prohibits tax on net income.

City Attorney Pete Holmes called the decision “disappointing” but, in a joint statement with Seattle Mayor Tim Burgess, said their goal to eliminate the state’s “over-reliance on regressive sales taxes” would continue.

“We are also living in a time of extreme income inequality that corrodes our social compact and causes many to wonder whether wealthy individuals are paying their fair share,” they said.

Opponents of the tax immediately hailed the ruling as proof Seattle officials knew the tax was legally flawed but still pushed it through.

“In our system of government, the Legislature makes laws and the courts interpret them,” Freedom Foundation Chief Litigation Counsel David Dewhirst told Fox News in a statement. “If you want to change the existing tax laws, you can ask your legislator to introduce a bill, or you can sponsor a ballot initiative. And if you want to amend the Constitution, there’s a process for that too.”

The tax, passed by the Seattle City Council in July, targets high-income earners as part of what local lawmakers describe as “a new formula for fairness.”

The tax measure requires residents to pay a 2.25-percent tax if they are a single filer and make more than $250,000 annually or file jointly and make more than $500,000.

Its passage prompted a court challenge from the Freedom Foundation, a conservative think tank that considers the tax a slippery slope that could open the door to more taxes in the future.

The outrage over the tax even prompted the Washington Republican Party to call for “civil disobedience” and urged its members to “refuse to comply, file or pay.”

The city estimates the new tax would raise $140 million a year and cost between $10 million and $13 million to set up, plus an additional $6 million a year to enforce. The money would go toward affordable housing projects as well as other services for lower-paid workers.

Councilmember Kshama Sawant told Fox News in July that the need for the tax is “crystal clear.”

She said the city isn’t backing down – and says Seattle is ready to duke it out in court in what’s likely to be a very costly legal battle.

“We will no longer tolerate a system that buries poor and working class people in taxes, while giving big business and the super-rich yet another free ride; a system that underfunds affordable housing to the point where thousands are homeless, a system that criminally underfunds education,” Sawant said.

Washington is one of seven states in the country that does not have a personal income tax.

Analysts at the Washington Policy Center also note the Washington Supreme Court ruled in 1951 to invalidate the state income tax. Further, a law passed in 1984 prohibits any city or county from levying a tax on net income.

The state’s voters have rejected the idea of an income tax nine separate times. Washington voters did approve an income tax in 1932, but the state Supreme Court ruled the measure was unconstitutional.