If the nation stops detaining illegal immigrants, the crisis at the border will get worse, the man who used to be responsible for enforcing the law told a House panel.

“After more than three decades of enforcing immigration law, I can assure you that if we do not have the ability to detain those that illegally enter our country until they see a judge and plead their case, we will never solve the immigration crisis on the border,” Thomas Homan said Thursday during a House Judiciary Committee hearing.

The Democrat-run hearing, titled “The Expansion and Troubling Use of ICE Detention,” included witnesses who were once detainees in immigration holding facilities.

Homan pushed back against talk from Democrats that he says claims arrests of illegal immigrants in the interior of the country are uncalled for.

“I’ve heard Speaker of the House Nancy Pelosi make the comment that ICE agents terrorize innocent immigrant communities,” Homan said. “ICE doesn’t arrest innocent immigrants. ICE arrests people who are here in violation of federal law, the law that you enacted.”

Homan may have been referring to a remark Pelosi made in March 2018.

“Fully half of those swept up in the ICE raids have no criminal record,” Pelosi said in reference to agency roundups of illegal aliens in Northern California, One News Now reported. “This raid was intended solely to terrorize innocent immigrant families and instill fear in the hearts of our communities—not to keep Americans safe. Parents will now be torn from their children, and spouses ripped away from their loved ones.”

Illegal immigrants are often caught at the border, held for a period of time, and then released with a court date, Brandon Judd, a Border Patrol agent and president of the National Border Patrol Council, told The Daily Signal in a June interview.

>>> Related: A Border Patrol Agent Shares What It’s Really Like at the Border

“The ones that we’ll actually detain pending their asylum or deportation proceedings, it’s normally going to be single adults,” Judd said. “If they have children in their custody, they’re going to be released.”

“That’s because there’s a 9th Circuit Court of Appeals case that says we can only hold children in our custody for 20 days,” he said. “If we don’t separate families, then we have to release the parents with the children as well within 20 days.”

Homan said that if legislators don’t like the current immigration system, they need to vote to change the laws.

“There’s people in Congress that called for the abolishment of ICE because they don’t like what ICE does,” Homan said. “ICE is merely enforcing the laws you enact. If you don’t like it, change the law. You’re the legislator. But don’t vilify the men and women of ICE and the Border Patrol.”

Homan, who retired as ICE’s acting director in June 2018, said:

I’ve been asked why do I put myself through this, to come up here and be insulted like I have [in the] last two hearings. I love the men and women in ICE and Border Patrol. I know what it’s like to wear that uniform and stand in that line, and I would defend the men and women of Border Patrol and ICE until the day I die.

Homan also said that attacks on those who protect the border dishonor their sacrifice.

“I buried many Border Patrol agents and I’ve buried ICE agents, and those kind of attacks dishonor their memory and dishonor their family,” he said. “This world is upside down when the people who knowingly violate the laws are the victims.”

