WASHINGTON – Acting Homeland Security Secretary Kevin McAleenan was hammered for hours by a congressional panel that pressed him on overcrowding in migrant detention facilities and other issues involving his department.

McAleenan's appearance Thursday before the House Oversight and Reform Committee centered on his role in separating migrant children from their families, conditions at the detention centers and a secret Facebook group where purported border agents mocked lawmakers and dead migrants.

The hearing is the latest in a series held by House Democrats targeting the administration's immigration policies, putting a spotlight on migrants who died in U.S. custody, the children separated from their parents when entering the country and the rapidly deteriorating conditions in detention centers.

“These were all decisions made by the Trump administration," Committee Chairman Elijah Cummings, D-Md., said Thursday. "The damage that the Trump administration has inflicted – and is continuing to inflict – will impact these children for the rest of their lives."

As McAleenan arrived at Thursday's hearing, several protesters in the room stood up and hoisted signs that said, "IMMIGRANTS WELCOME." A group protested outside the Capitol about the detention of migrant children.

McAleenan said in his opening statement that he pleaded for more than a year with Congress for more funding to address the conditions at the border and to tackle laws that he said incentivize migrants to come to the USA.

He took on the Trump administration's zero-tolerance policy, which led to the separation of migrant children from their families.

"I have acknowledged that initiative, while well intended, lost public trust, and President Trump was right to end it," he said, adding that separations are "rare and undertaken in the best interest and safety and welfare of the child."

Last week, Vice President Mike Pence toured two migrant detention facilities in Texas – an air-conditioned center for families and children and a severely overcrowded facility holding adult men, where migrants complained they hadn't showered in weeks and slept on concrete floors.

Rep. Jackie Speier, D-Calif., highlighted those conditions by holding up a photo she took last weekend during a trip to migrant facilities along the border. The photo showed a shirtless man in a crowded cell holding up 4-0 on his fingers, the number of days he'd been held in the facility without a shower or being able to brush his teeth.

"This would not be allowed as a kennel for dogs," Speier said. "It’s unacceptable, and it has to change. We don’t treat human beings like that."

McAleenan said he agreed and had asked Congress for increased funding for Immigration and Customs Enforcement detention beds, which was denied.

Republicans pointed out the same, arguing throughout the hearing that the Democratic-controlled House ignored the crisis for months, allowing it to fester without adequate funding or solutions to halt the surge of migrants seeking refuge in the USA.

Ohio Rep. Jim Jordan, the top Republican on the committee, said that as the crisis gets worse, "what do Democrats do? They blame the president of the United States" and Border Patrol agents.

"Everyone knows what has to be done," he said. "Everyone knows this. We've got to fix the asylum laws, got to fix the Flores decision, you've got to build a security wall."

Democrats and Republicans disagree on how to halt the surge in illegal immigration. Republicans, including the president, have repeatedly asked to overhaul asylum laws and the Flores Settlement, a case that established requirements for the treatment of immigrant families and children in federal custody. Democrats have blamed the Trump administration's policies for causing the huge jump in the number of individuals detained in facilities. They argue a comprehensive overhaul of the nation's immigration laws is needed and enforcement should center on immigrants with criminal records, not families or those fleeing violence or looking for a better life.

'Disturbing' Facebook posts:Border agents investigated over posts ridiculing immigrants, lawmakers

‘They tore out a piece of my heart’:Migrant mother describes toddler’s illness, death

Pence's tour:As Democrats spotlight poor conditions in migrant facilities, VP visits centers

Cummings took McAleenan to task for his role in separating migrant children from families, saying, "I’m at a point where I begin to wonder whether there is an empathy deficit."

Cummings pressed McAleenan on the reunification of kids with their parents and the speed of doing so. "I'm talking about the results," McAleenan started to say before Cummings interjected.

"Yeah, I’m talking about human beings," the Maryland Democrat said. "These are human beings. Human beings just trying to live a better life."

As the hearing continued, protesters outside the Capitol marched with signs reading, "Everyone is sacred" and "Migrants and refugees are not pawns on the chessboard of humanity."

Joe Battistelli, who protested with the Coalition on Human Needs, said he was there to rally against "the inhumane treatment of migrants at the border."

"We believe that it’s unconscionable that in this day and age and in this country that we would be doing this again," he said. "You don’t treat people like this. They’re human beings."

Last week, the Oversight Committee held a hearing that featured testimony from some of the most liberal and outspoken lawmakers in the Democratic-led House, including Rep. Alexandria Ocasio-Cortez, D-N.Y.

She and Reps. Ayanna Pressley, D-Mass.; Rashida Tlaib, D-Mich.; and Veronica Escobar, D-Texas, testified about their tour of a migrant detention center in Clint, Texas, and described the women and children they met and the conditions they witnessed.

Days later, Ocasio-Cortez, Pressley, Tlaib and Rep. Ilhan Omar, D-Minn., who call themselves "the Squad," were the target of tweets by President Donald Trump, who said the four freshmen lawmakers should "go back and help fix" where they came from. The comments were widely condemned as racist.

The night before Thursday's hearing with McAleenan, Trump held a rally in North Carolina where he again railed against the female lawmakers. When he brought up Omar, his supporters chanted, "Send her back." Trump distanced himself from the chant the next day and said he "wasn't happy with that message."

Trump's remarks and tweets were condemned this week by the House in a vote largely along party lines, though four Republicans joined Democrats to denounce his comments as racist.

McAleenan took on the role heading the Department of Homeland Security – which oversees everything from the Federal Emergency Management Agency to immigration enforcement and migrant detention centers at the border – in April and has been a primary target of scrutiny over the Trump administration's immigration policies.

Before Trump chose him to head the DHS, McAleenan carried out some of the president’s most controversial initiatives as commissioner of Customs and Border Protection to halt undocumented immigrants and asylum seekers from crossing the southern border.

The customs officers and Border Patrol agents he commanded separated more than 2,800 migrant children from their families during Trump’s "zero tolerance" policy before it was discontinued.

His officers fired tear gas into a crowd of migrants attempting to approach the San Ysidro Port of Entry between San Diego and Tijuana last year, leading to questions about the administration’s response to a rush of asylum-seeking migrants.

At least six migrant children have died in U.S. custody since December.