The controversial robodebt scheme would have been fundamentally changed or stopped altogether had independent legal advice been sought on the issue, a royal commission has been told.
The commission examining the Centrelink debt recovery scheme was told such independent advice would have "reputational damage" to the government and the departments administering the program.
Former Social Services principal legal officer Anna Fredericks told the commission while obtaining independent legal advice on the scheme was sought, tensions between the Department of Social Services and the Department of Human Services prevented it from occurring.
"If independent legal advice had been sought at the time and had full scope and awareness of the program, I have no doubt they would have come to that view (of it being unlawful)," she said.
"It would have undoubtedly led to a redesign or cessation ... it would have likely caused reputational damage to those two departments but also to the government."
The commission is examining why the controversial Centrelink debt recovery scheme was established in 2015 and how it continued until 2019, given the program had generated significant criticism by early 2017.
The robodebt scheme used annual tax office data to calculate average fortnightly earnings and automatically issue welfare debt notices.
The program recovered more than $750 million from 381,000 people and led to several people taking their own lives while being pursued for false debts.
Ms Fredericks said those in the department were of the impression income averaging methods to determine the levels of debt were only used as a last resort, if attempts to contact recipients by phone or mail were unsuccessful.
She said she would later discover income averaging was not only a last resort method, and that she had accepted what had been told to her about the scheme.
"I would put that I accepted the veracity of what had been put to me in a complex program, which I had no background in," she told the commission.
Ms Feredericks said there was a direction within the department to stick to talking points about the robodebt scheme.
Royal Commissioner Catherine Holmes said there had been a "certain passivity" among lawyers within the government department at the time it was providing advice on robodebt.
The commission will also hear from government solicitor James Carter, along with Department of Social Services senior officials Allysson Essex and Kristin Lumley, who were involved in payment integrity.
Former ministers Christian Porter and Alan Tudge will give evidence next week.