Washington (CNN) Homeland Security Secretary Kirstjen Nielsen on Tuesday defended an agency policy that will result in more families being separated at the border, saying, under a barrage of questions at a Senate hearing, that similar separations happen in the US "every day."

But Nielsen also agreed with senators that more must be done to protect the children who either come to the US without their parents or are separated from them.

Nielsen was testifying Tuesday at a Senate Homeland Security and Governmental Affairs Committee hearing, where lawmakers on both sides of the aisle raised concerns about what happens to immigrant children who end up in the custody of DHS, who -- by law -- transfers such minors to the custody of Health and Human Services within two days.

"Once you start taking these children, please, I don't think any record should reflect that somehow, you are confident or anybody is confident that they're being placed in a safe and secure environment," said Sen. Claire McCaskill, the top Democrat on the committee.

Nielsen said the department has recently instituted a policy that it will refer everyone caught crossing the border illegally for prosecution, even if they are claiming they deserve asylum or have small children. Any parents who are prosecuted as a result will be separated from their children in the process.

Read More