The federal government has settled a landmark challenge against its robodebt program – conceding a $2,500 debt raised against Deanna Amato was not lawful because it relied on income averaging.

In orders made by consent on Wednesday, the federal court declared the debt was “not validly made”, that an order to garnishee Amato’s tax return was also invalid and there was no basis to add a 10% penalty to the debt.

Rowan McRae, the executive director of civil justice access at Victorian Legal Aid, said the case has “helped to clarify the unlawfulness of the robodebt system for hundreds of thousands of Australians in the same situation, who received or paid off a robodebt based only on averaging”.

Last week the federal government abandoned sole reliance on income averaging to calculate debts, dismantling a central plank of the robodebt program’s automation which has seen tens of thousands of welfare recipients overcharged for alleged debts.

Welfare groups, legal centres, Senate inquiries and a former administrative appeals tribunal senior member, Terry Carney, have all warned that income averaging is not a proper basis to claim a debt.

The same argument is being pursued in a class action by Gordon Legal challenging the legality of the entire program.

Amato, a 34-year-old local government employee, found out Centrelink claimed she owed a debt in January after it sent repeated notices to an old address then garnished her $1,700 tax refund.

Amato disputed the debt in the federal court, prompting the commonwealth to reduce her debt to $1.48 in September, but the case continued even after the radical overhaul to the system announced by government services minister Stuart Robert.

In a statement explaining the consent orders, the court noted the initial debt of $2,900 was calculated based on Australian Taxation Office income data averaged across fortnightly periods as if this were Amato’s actual income in each period.

The court said the conclusion Amato had received social security benefits she was not entitled to was “not open on the material before the decision-maker” because there was “no probative material” that the average reflected Amato’s actual income.

“In the circumstances, there was no material before the decision-maker capable of supporting the conclusion that a debt had arisen … The conclusion that a debt had arisen was therefore irrational, in the requisite legal sense.”

The court ordered the commonwealth to pay Amato’s costs and $92 interest.

Amato said she was delighted at the “amazing” news. “You can feel so small and helpless next to the government, but I am so glad that the unfair and ultimately unlawful aspects of this system have been brought to light,” she said in a statement.

“I had my money refunded to me, but I hope that others who have paid dodgy debts will also have a way to get their money back.

“I feel a weight lifted off my shoulders. I’ve proven my innocence, but also proven that there are reasons why you need all the facts before you can demand debt payments from people.”

McRae said while last week’s changes are “significant” they came “too late for many people who have experienced distress and hardship, or who have already paid robodebts through tax garnishee action and debt collectors”.

“Today’s result shows the federal government has accepted what advocates have been saying for years – using only income averaging to raise debts is both inaccurate and inconsistent with the Social Security Act.”

The shadow attorney general Mark Dreyfus said the judgment “simply confirms that we have got a Commonwealth government that has been extorting money from Australian citizens with no basis for doing so”.

“It’s an extraordinary scandal, robodebt,” he told the ABC. “I just think that the prime minister owes the Australian people an apology for this extraordinary program.”

On Wednesday the Senate passed a motion ordering the government to produce legal advice explaining why it made the changes to the system, with Greens senator Rachel Siewert demanding to know “the legal status of this program”.