The American Civil Liberties Union expressed disappointment Tuesday the newly passed Department of Homeland Security funding bill contains funding for immigration detention facilities. The organization questioned the provisions despite the fact the bill passed without any measures that would undo President Barack Obama’s executive orders protecting millions of illegal immigrants from deportation.

“Thankfully, the harmful amendments were stripped, but the bill still allocates over $362 million to imprison thousands of mothers and children fleeing domestic abuse and lethal violence in Central America. This is a very troubling development,” ACLU legislative council Joanne Lin said in a statement. “Mandatory detention of people awaiting their immigration proceedings violates the right to due process and is inefficient and costly. Instead of funding immigration detention, Congress should appropriate money for community-based alternatives to detention with case management services, which have been proven to be effective and cost-efficient.”

The U.S. government uses immigration detention facilities to house thousands of immigrants who await hearings on whether or not they will be allowed to remain in the country. Women and children who apply for asylum in the United States on grounds of physical abuse, neglect or various other crises are often kept in the facilities. Funding for newer detention facilities would have come to an indefinite halt if Congress had not agreed to a new Homeland Security funding bill, Reuters reported. Critics argue detention centers are damaging to immigrant families and an ineffective use of taxpayer money.

Congress battled for weeks regarding terms of a new funding bill amid demands from the GOP that any bill include measures that would reverse Obama’s immigration policies. The president took executive action last November to protect as many as 5 million undocumented immigrants who have spent sufficient time in the country or have significant family ties in America. Several bills died on the House floor in the past two months before the House passed a bill that secures funding for the DHS through September.

The bill, which passed by a vote of 257-167, received unanimous support from House Democrats, but fewer than a third of Republicans. Despite pushback from House conservatives, Republican House Speaker John Boehner chose to support the bill to avoid a shutdown after it became clear a bill that hampered Obama’s immigration policies would not make it through the Senate.