A review into the detention of hundreds of foreign nationals in the United States following the 11 September 2001 attacks has found significant problems in the way they were handled.
The report, by the inspector general of the US Justice Department, says some of the detainees were held in unduly harsh conditions and were subject to abuse.
The report looks into the cases of 762 people who were living in the US illegally and were detained in the 11 months following the attacks.
In the wake of 11 September hundreds of illegal immigrants were rounded up
It concludes that some had to wait more than a month before being charged with any offence, and that they remained in custody for weeks without any investigations taking place as to whether they actually had any links to terrorism.
The report is particularly critical of conditions at the Metropolitan detention centre in New York.
Eighty-four of the detainees were held there under what the report calls highly restrictive conditions, including being locked up for at least 23 hours per day.
The US says it will use all means necessary to ensure its security
They were also subject to escort procedures that included hand-cuffs, leg-irons and heavy chains; and a limit of one legal telephone call per week, which the report says prevented them from obtaining timely advice.
Some detainees also suffered a pattern of physical and verbal abuse at the centre.
The Justice Department says its actions were fully within the law, adding that it makes no apologies for finding every legal way possible to protect the American public from terrorist attacks.