A proposed bill amendment which would have taken aim at the pay packets of Iowa Supreme Court judges who ruled to allow equal marriage in 2009, has failed in the House.

The state legalised equal marriage for gay couples in 2009 after Supreme Court judges said a ban violated the constitution.

On Thursday, on considering the spending plan for the state, worth $167.7 million (£108 million), a group of Republican lawmakers proposed the amendment which could have reduced the pay of Supreme Court judges, if the state ever re-banned equal marriage.

Under the proposal, if the state overturned the decision that banning equal marriage was unconstitutional, in effect re-banning it, any judges still in the Supreme Court who ruled on the original decision would have their salaries cut to the same level as state legislators.

One of the sponsors of the bill Dwayne Alons, said the amendment would protect against overreaching judicial decisions.

“We are standing on the sideline allowing the rule of law to be basically ignored, and we’re allowing an oligarchy type of situation to rule and reign in this state,” he said.

Representative Tom Shaw went on to say that lawmakers had failed to uphold the government’s system of checks and balances, because they did not punish the court for its decision.

After sponsors of the bill described and defended it, lawmakers, however, withdrew it, and no vote was taken on it.

Representative Chip Baltimore, chairman of the Judiciary Committee, was to speak on the amendment during the debate, but said afterwards that he did not think it would have been successful.

“It is extraordinarily poor public policy to attempt to tie different compensation levels to different individuals in the judicial branch based upon a decision that they’ve made,” he said.

“That position is certainly not representative of all Republicans here in the House or even most Republicans here in the House. “

The amendment was eventually retracted, and the original spending bill passed with Republicans and Democrats almost unanimously in the House with 90 votes to 3. It takes effect on 1 July.