WASHINGTON, D.C. — The acting head of the U.S. Department of Homeland Security has ordered an investigation into reports that Border Patrol agents have been posting offensive anti-immigrant comments and threats against lawmakers on a private Facebook group.

The move was announced amid mounting criticism of the Trump administration’s handling of a humanitarian crisis along the U.S.-Mexico border, with lawmakers and government investigators warning of dangerous conditions in migrant detention centers.

“Reporting this week highlighted disturbing & inexcusable social media activity that allegedly includes active Border Patrol personnel,” acting DHS head Kevin McAleenan said on Twitter on Wednesday.

He called the reported comments allegedly made by former and current members of the U.S. Customs and Border Protection (CBP) agency “completely unacceptable,” and said any employee found to have “compromised the public’s trust in our law enforcement mission will be held accountable.”

The Facebook posts, first reported by the non-profit news site ProPublica, included jokes about the deaths of migrants and sexually explicit content referring to U.S. Rep. Alexandria Ocasio-Cortez, a Democrat who was highly critical of the detention facilities after a tour this week.

Democratic Senate Minority Leader Chuck Schumer issued a statement on Wednesday calling for the firing of the acting head of the CBP and other top leaders at the agency as a first step to reigning in a “toxic culture” there.

U.S. lawmakers, officials and rights activists who have visited CBP detention centers describe nightmarish conditions marked by overcrowding and inadequate access to basic necessities, including food and water.

Dr. Sara Goza, the incoming president of the American Association of Pediatrics, toured CBP facilities in McAllen, Texas, last week and described the rooms where children were being detained as reeking of sweat, urine and feces.

The AAP also shared images of drawings made by children recently released from CBP custody. The drawings, which depicted the children being held in cages, were provided by a social worker in Texas.

The DHS’s inspector general on Tuesday said migrant-holding centers in Texas’ Rio Grande Valley were dangerously overcrowded, publishing graphic pictures of cells holding twice as many people as they were built for.

“How can anybody look at these photos and think this isn’t a human rights abuse?” Sen. Kamala Harris, a candidate for the 2020 Democratic presidential nomination, wrote on Twitter on Wednesday, referring to the photos published by the watchdog.

The Trump administration has pushed back against criticism that migrants in detention centers are being mistreated.

On Wednesday, the White House attacked a ruling by a federal judge in Seattle who on Tuesday blocked an administration move to keep thousands of asylum seekers in custody while they pursued their cases.

“The district court’s injunction is at war with the rule of law,” White House press secretary Stephanie Grisham said in a statement. “The decision only incentivizes smugglers and traffickers, which will lead to the further overwhelming of our immigration system by illegal aliens.”