PHOENIX (AP) — A judge has ruled that an Arizona law that caps employer contribution rates to retirement funds for judges and elected officials is unconstitutional.

The Maricopa County judge on Monday ordered the Legislature to significantly increase funding for the statewide pension system for judges and other elected officials that is in danger of going bankrupt.

Colin Campbell, an attorney for the two retired judges who filed the lawsuit, said the rates set by the Legislature in 2013 were "bleeding the fund dry."

Judge Timothy Thomason did not tell the Legislature how to fix the shortfall in the fund. But he advised that payments from public employers, such as the state, would need to nearly double or lawmakers would need to pump an additional $43 million a year into the trust.

If lawmakers decide to increase contribution rates from the current level to 53 percent, it will cost the state and counties $78,002 a year to pay the pension benefits of a Superior Court judge earning $147,175 annually.

Assets in the trust are expected to be depleted in the next 10 to 13 years if changes are not made.

House Speaker J.D. Mesnard, a Chandler Republican, said he expects an appeal of the judge's decision.

"Then at some point, we're going to have to tackle all the pension-related issues," Mesnard said.

Mesnard said state lawmakers have two options: Either divert money from other public needs, such as health, public safety or education, or send a constitutional amendment to the voters.