PHOENIX - Tucson can keep its unique system of electing council members despite a state law to the contrary, the Arizona Supreme Court ruled Friday.

In a unanimous decision, the justices said charter cities, such as Tucson, have constitutional rights that include the power to decide both whether to elect council members on an at-large or district basis, and whether to conduct elections on a partisan basis.

That means Tucson can continue to have candidates designate their party affiliation despite a 2009 state law that forbids cities from having partisan elections for mayor and council. Only Tucson has such a system.

And the court said lawmakers cannot force Tucson to conduct elections on a ward-only basis. A 2009 state law sought to strike down a hybrid system, used only in Tucson, where council candidates first must be nominated in a primary within their own wards, but then run citywide in the general election.

While the ruling most immediately affects Tucson, it has statewide implications.

There are 18 other charter cities. Friday's ruling spells out that they have certain rights that state lawmakers cannot take away.

The decision is a major defeat for the Republican-leaning Southern Arizona Leadership Council, which pushed for the change in hopes of altering Tucson politics.

It also is a setback for Jonathan Paton, who used his political capital as a state senator in 2009 to persuade GOP colleagues who control the Legislature to try to undermine a city system that goes back to 1929. He argued that the state has a legitimate interest in telling cities how their elections should be run.

But Justice Scott Bales, writing for the high court, said that's not the case for cities that exercise their constitutional rights to enact a charter for self-government.

Paton, now a candidate for Congress, did not return calls seeking comment.

The basis for the 2009 law was Paton's arguments Tucson's government is "dysfunctional" and needs to change.

"We're still kind of in the mode of a small town that I think could really benefit from getting rid of some of the partisanship that's happened in the past," he argued, repeating the oft-cited political saw that city issues, like fixing potholes and picking up the trash, are not Democrat or Republican issues.

The other complaint was a response to Tucson having two wards where Republicans outnumber Democrats, while Democrats are a clear majority in the other four, giving the party a citywide advantage of 90,741 Democrats against 52,888 Republicans.

Attorney General Tom Horne argued that under the city's hybrid system, most voters in a ward may support one candidate, only to have their selection thwarted in the citywide general election.

He told the justices that is unfair.

But Bales said accepting Horne's argument ignores the fact many Arizona cities do not have districts at all, but elect their council members on a citywide basis.

"Tucson council members, although nominated by ward, represent the entire city, just as do council members elected at large in other cities," he wrote.

Tucson City Attorney Mike Rankin said Tucson voters had a legitimate reason for using the system to elect council members.

"They represent everyone in the city, not just the people in their wards," he said. Rankin said once council members are elected, they get to vote on issues of citywide concern ranging from the budget to where new fire stations will be located.

Bales said arguments why the city system is good or bad are legally irrelevant.

The key issue, he said, is "whether Arizona's Constitution entrusts those issues to the voters of charter cities or the state Legislature."

Bales said that, when everything is examined, including the history of municipal government in Arizona, the answer is clear, that electors in charter cities are empowered to make the decision, as long as the system complies with federal law.

Tucson's system has been reviewed and approved by the U.S. Department of Justice multiple times.

The court also noted Tucsonans have had a chance to alter the system. In 1991, voters rejected a proposal to go to a straight district-based election. And a proposal to scrap partisan elections was defeated two years later.

Friday's ruling is the second defeat for Paton and his causes within a month.

Last month Maricopa County Superior Court Judge Mark Brain tossed out Paton's contention that members of the Citizens Clean Elections Commission and its executive director were illegally using public funds to influence a possible future election.