Senators from both parties grilled Trump administration immigration officials Tuesday, demanding answers about the separation of immigrant families and reports of sexual harassment.

The Republican who chairs the Senate Judiciary Committee, Chuck Grassley, said the administration had "mishandled the family separations," saying that while "the attorney general’s policy was well-intentioned," it had "unintended consequences."

Attorney General Jeff Sessions had announced the "zero tolerance" policy this spring that led to the separations.

The administration failed to meet last Thursday’s court-ordered deadline to reunite all families separated at the U.S.-Mexico border. Of the more than 2,500 children separated from their families, Grassley said that almost a third -- approximately 711 -- are still in government custody and are unable to be reunited with their parents.

Grassley added that 431 of those 711 children are ineligible for reunification because their parents have already been deported.

"If families and children are going to be kept in federal custody they must be kept in facilities where they will be treated humanely, and with the basic dignity that all people—no matter what their immigration status—deserve," Grassley said. "Unfortunately, recent media reporting I’ve seen suggests the federal government is failing miserably at this task."

Grassley and the top Democrat on the committee, Dianne Feinstein of California, had issued a statement Monday citing allegations of sexual, physical and emotional abuse made against Immigration and Customs Enforcement and Health and Human Services workers.

“These allegations of abuse are extremely disturbing and must be addressed. This is not a partisan issue as reporting suggests many have been occurring for years. Immigrant families and children kept in federal custody deserve to be treated with basic human dignity and respect and should never be subjected to these forms of abuse,” the senators wrote.

A top Health and Human Services official said the agency had warned the administration that separating children from their parents would be detrimental to their health.

"Did any member of this panel say to anyone, maybe this isn't such a good idea?" Connecticut Democratic Sen. Richard Blumenthal asked.

"We raised a number of concerns ... about any policy that would result in family separations due to our concerns for the best interest of the child," Commander Jonathan White of the U.S. Public Health Service Commissioned Corps answered. "Separation of children from their parents entails significant risk of harm to children."

As for documenting immigrants that reach the southern border, Sen. Dick Durbin, an Illinois Democrat, pressed Matthew Albence, executive associate director of enforcement from Immigration and Customs Enforcement, if there was a formal piece of documentation parents would sign to voluntarily leave their children behind.

Albence did not give a direct ‘yes’ or ‘no’ answer and referred to a new document being used since early July to document a parent’s decision as a result of an American Civil Liberties Union lawsuit.

Defending conditions in the holding facilities, Albence said, "With regard to the FRCs (Family Residential Centers), I think the best way to describe them would be like a summer camp."

In the wake of government confusion keeping track of parents and children, Sen. Patrick Leahy, a Vermont Democrat, told Carla Provost, acting chief of the U.S. Border Patrol, that wristbands used to track children at Chuck E. Cheese's restaurants worked better than the government's system.

Toward the end of the hearing, Sen. Kamala Harris, a California Democrat, told Albence that she was told by mothers inside the facilities that they have to pay 85 cents a minute to make phone calls and would clean toilets and do laundry for $1 a day.

Albence responded it was a voluntary work program individuals could participate in while they wait for their hearing.

Before the hearing, protestors walked out of the hearing holding signs that said “Keep Families Together” and “Reunite Children and Parents.”