An $11 billion budget loophole has been closed by federal parliament after urgent laws were rushed through both houses.

The laws relate to a successful Federal Court case brought by foreign affairs official Brendan Peace and other parties, who argued the Commonwealth should have paid him superannuation for a rent-free accommodation allowance received on overseas postings.

It was argued the Commonwealth was in breach of enterprise agreements and federal workplace laws, reducing the value of Mr Peace’s superannuation entitlement.

The laws would be retrospective, meaning around 10,000 public servants employed since 1986 would not be able to access lump sums, which could be worth between $1 million and $11 million each. 

Assistant Treasurer Stephen Jones said if the retrospective laws were not passed it would have cost “in the order of $11 billion”.  

“These are not small amounts of money, no sane government could do anything other than what we are proposing to do today,” Mr Jones told parliament on Thursday.

“The urgency is providing certainty to employees and indeed to litigants in the matter.”

The opposition supported the government in passing the laws. 

Opposition spokesman Stuart Robert said the coalition had been “keeping an eye on this as a very high risk public administration issue” prior to the May election.

He acknowledged it was a difficult issue but one that needed to be addressed.

“Since 1986, the Commonwealth has typically not treated rent-free housing as forming part of superannuation salary and generally neither employers or employees have made superannuation contributions that have taken into account the value of rent-free housing,” he said.

“We’re having to face a difficult issue whereby these issues weren’t defined, but it doesn’t mean the definition wasn’t implied and well understood for almost a third of a century.” 

The Greens opposed the legislation, arguing it was bad process to rush through a law without parliament having the chance to consider it in detail.