The border patrol agency in Arizona has been ordered to improve the conditions at most of its holding facilities in the state.

A federal judge made a temporary injunction on 18 November, instructing the border patrol's Tucson sector to give clean mats and blankets to people it held for more than 12 hours.

Judge David Bury said the agency had not been following its own standards, and was keeping people in crowded and cold cells in a case brought by the ACLU, immigrants rights organisations and the Morrison and Foerster law firm, the Associated Press reported.

"We believe that the conditions were so below par that when you have people, whether it's two nights or one night sleeping on the floor, that is just below any constitutional standards or norms of decency," ACLU senior counsel Dan Pochoda said.

The border patrol agency argued it was committed to good practices, and said it provided medical assistance, food and water, and made sleeping arrangements for the people it held overnight.

But has been ordered to make changes, as well as providing medical screening and other conditions that are necessary to meet the personal hygiene needs of migrants, AP said.

Last year, the judge issued sanctions against the agency for alleged destruction of CCTV footage linked to the case.