A federal judge granted immigration lawyers’ request to provide them class-action status in a lawsuit that accuses the U.S. Border Patrol of holding immigrants in "inhumane and punitive conditions" at its Arizona facilities.

In a lawsuit filed in June last year on behalf of three migrants, immigrant rights advocates alleged that the migrants were denied food, adequate clothing and sleep while being held at the Border Patrol facilities near Tucson, reports The Washington Post.

According to the suit, immigrants detained at Border Patrol stations were subjected to harsh conditions that included sleeping in crowded and dirty cells with no access to showers, soap, feminine sanitary napkins, telephones or legal counsel. Hence, it argued that the Border Patrol stations violated the U.S. Constitution and Department of Homeland Security (DHS) policies.

"Defendants' regular use of these filthy, cold, and often overcrowded holding cells for longer-term detention is dangerous, inhumane, and punitive," stated the complaint, which names top officials at DHS and U.S. Customs and Border Protection.

"Defendants systematically deny Plaintiffs and putative class members' basic hygiene items. Detainees in Tucson Sector holding cells have no access to soap, showers, towels, toothpaste, or toothbrushes. Cells are dirty and not regularly or properly cleaned and are not equipped with waste receptacles," it reads.

On the contrary, the government motioned for the lawsuit to be thrown out on legal and constitutional grounds and cited the demands of keeping up with the surge of in unaccompanied children and families crossing the border.

"Border Patrol stations are not designed for long-term care or detention; rather they are short-term facilities, and every effort is made to promptly process, transfer, or remove those in custody at the stations as quickly as is appropriate and operationally feasible," government attorneys argued. "Even accepting plaintiffs' allegations as true, periods of crowding may occur due to circumstances out of Border Patrol's control. This does not rise to the level of a constitutional violation."

However, U.S. District Judge David C. Bury denied the Obama administration's request to dismiss the case on Monday.

Now that the case has been granted class-action status, the lawyers will be able to interview more migrants and gather more evidence about their treatment.

"It's a huge victory because the court validated what thousands of detainees and advocates have been saying for years about the deplorable conditions in the short-term detention facilities," said Nora Preciado, an attorney with the National Immigration Law Center, one of the groups that filed the suit, reports Tucson.com. "The conditions there are inhumane."