White House press secretary Sarah Huckabee Sanders defended the administration’s detention of nearly 1,500 immigrant children by citing the Bible.

In a series of heated exchanges between Sanders and reporters at Thursday’s press briefing, the press secretary seemed to have trouble explaining the reasoning behind the practice of separating children from their parents when they cross into the U.S. illegally.

After CNN’s Jim Acosta asked Sanders about Attorney General Jeff Sessions’ claim that separating parents from children is rooted in the Bible, Sanders said that following the law is biblical.

Asked about Jeff Sessions' claim that separating children from parents is rooted in the Bible, Sanders says "it it is very biblical to enforce the law."

“It is very biblical to enforce the law, that is actually repeated a number of times throughout the Bible,” Sanders said.

But reporters including Acosta reminded Sanders that no one was forcing the administration to hold children captive, and that there is in fact no law forcing it to separate them from their parents.

“Can you imagine the horror these kids must be going through when they come across the border?” Acosta asked. “They’re with their parents and they’re suddenly pulled away from their parents ― why is the government doing this?”

“Because it’s the law and that’s what the law states,” Sanders responded.

“It doesn’t have to be the law. You don’t have to do that,” Acosta said.

On Wednesday, reporters were allowed for the first time to see a Texas facility housing nearly 1,500 immigrant children separated from their parents by the U.S. government. MSNBC reporter Jacob Soboroff said the children ― many of whom have been detained for months ― are essentially in a prison.

“I kid you not, one of the first things an employee of the shelter said to me is, when we walked inside, ‘Can you try to smile at these kids, because it’s weird to see people from the outside.’” Soboroff said on MSNBC. He recalled the employee adding: “They feel like animals locked up in cages being looked at.”

“You’re a parent, don’t you have any empathy?” Karem asked. “Come on, Sarah, you’re a parent. Don’t you have any empathy for what these people are going through? They have less than you do. Seriously, Sarah, seriously. These people have nothing.”