SEATTLE — A judge ruled Wednesday that a new income tax on wealthy Seattle residents is illegal.

King County Superior Court Judge John Ruhl said in his ruling that the tax is prohibited by state law, agreeing with lawyers in multiple lawsuits challenging the ordinance.

Attorneys for plaintiffs called the ruling a victory.

“The Seattle City Council knew when it first passed this last summer that taxes in this state have to be applied uniformly,” said Tom McCabe, chief executive of the Freedom Foundation, a co-plaintiff in the lawsuit.

The council voted unanimously in July to impose a 2.25 percent tax on the city’s highest earners, saying it wanted to test the legality of an income tax in Washington state and open a broader debate about the wealthy paying their fair share in a booming city with an affordable housing crisis.

Under the ordinance, residents would pay a 2.25 percent tax on income in excess of $250,000 for individuals and in excess of $500,000 for married couples who file taxes jointly.

Seattle Mayor Tim Burgess and City Attorney Pete Holmes said in a joint statement the city will appeal the ruling. Both called the state’s tax system unfair because it relies too much on sales taxes and said the state needs to overhaul its tax structure to make the system more equitable.

“We need more progressive tax sources, not fewer,” Burgess and Holmes said in the joint statement. “The Seattle income tax was an attempt to move toward this goal, and we are hopeful that it will be upheld on appeal.”

Washington is one of seven states without a personal income tax, and a state law passed in 1984 prohibits a county, city, or city-county from levying a tax on net income.

The city estimates the income tax would raise about $140 million a year. Revenue could be used to lower property taxes, pay for public services such as transit and housing and meet carbon reduction goals.

Voters have rejected personal income tax-related measures at the statewide ballot several times over the past eight decades. They did approve an income tax in 1932, but the state Supreme Court ruled the measure unconstitutional the following year.