Anglesey council's housing benefit office has been described as "a shambles" which could leave council tax payers with a bill of more than £400,000.
Anglesey council tax payers could face a bill of £444,661
The council is in dispute with the UK Government after the Department of Work and Pensions ruled last year the authority had been overpaid more than £2m in housing benefit subsidies and demanded a "claw back" of 20% of that sum.
Nigel Giffin QC, representing the government at London's High Court, said a catalogue of under-staffing, incompetence and a "state of disarray" had reigned in its housing benefit office over the three financial years from 1997 to 2000.
He said staff were given no proper training.
There was "a complete failure" to have any adequate checks on benefit payments and warnings - both internally and from the District Auditor - were "not acted upon", he claimed.
The "very high level of sickness absence" in the office was illustrated when, at one point, there were only two staff members on duty, with the other seven all either on sick or maternity leave.
Staff were allowed to work "without any effective supervision, under enormous pressure, because of the shambles that it was all in," added Mr Giffin.
The court heard the council failed to abide by a statutory requirement that housing benefit payments must not be renewed without claims first being referred to a rent officer - a measure designed to stamp out fraud.
The government "claw back" threatens to leave a gaping hole in the budget for local services and, if successful, will leave the people of Anglesey to cover the debt through their council tax bills.
Mr Giffin said the statutory requirements - designed to protect the public purse from inflated rents and to ensure claimants receive the benefit that is their due - "were simply written off", he told the judge.
Although other councils had made similar mistakes he said the view taken by the department was that Anglesey "stands out by virtue of the magnitude of its shortcomings."
Anglesey is challenging the claw back at the High Court, claiming the "inadvertent errors" made in its housing benefit office were only "minor" ones and caused no loss to the public purse.
Mr Richard Drabble QC, representing the council, told Mr Justice Lindsay there could be "no conceivable justification" for the department's decision which he described as "wholly disproportionate."
Describing the Government's decision to claw back the cash as "arbitrary" and "irrational", he said it amounted to a "punishment" which took no account of the impact on local tax payers and local services.
The judgement has been reserved until a later date.