Phoenix and Tucson can keep their elections in odd-numbered years, a judge has ruled, despite an Arizona law requiring conformity with the state elections cycle.

Pima County Superior Court Judge James Marner on Tuesday ruled that the law stands, but the two cities need not comply with it because it conflicts with their charters, which are the equivalent of constitutions.

The legislation was passed in 2012, with legislators saying that consolidating elections altogether would save money and increase voter turnout in the cities.

The cities sued, arguing their charters give them the right to set their own elections cycles. They also argued that if municipal elections were on statewide general election ballots, their races would be so far down the ballot that voters might not get to them.

Ken Strobeck, executive director of the League of Arizona Cities and Towns, said the decision is good news.

"It’s definitely a favorable opinion as far as the authority of charter cities is concerned in the state," Strobeck said. "And that really was the pivotal issue that the cities of Tucson and Phoenix filed suit on, the fact that the state law conflicted with their city charters."

Because of the candidate filings and other preparation work, this year's municipal elections in Phoenix and Tucson were scheduled to go ahead because of the court challenge to the law.

Tucson Mayor Jonathan Rothschild said he thinks the court made the right decision.

“The city of Tucson, citizens and voters should have the right to determine how their elections proceed," he said. "Municipal elections are really a matter...local voters should have control over."

Rothschild also said he hoped this would be the end of the matter, but he added the state can appeal the court’s decision.

Tucson and Phoenix were the only two cities to challenge the 2012 election cycle law.