(CNN) President Donald Trump on Friday defended recent, large-scale raids by Immigration and Customs Enforcement officials and the way the agency dealt with children of the immigrants who were detained.

Asked Friday why there wasn't a better plan in place to deal with the children after their parent's arrest, Trump told reporters outside the White House south lawn, "You have to go in, you can't let anybody know."

"Otherwise when you get there, nobody will be there," Trump said. "The big factor is to let people outside of the country that want to come in legally," he continued, then praising Mexico's efforts to deter migrants from illegally entering the US.

"I just hope to keep it up," he added.

Authorities hailed Wednesday's sweep at seven Mississippi food processing plants as a record-setting operation. At least 680 undocumented immigrants were detained. More than 300 of them had been released by Thursday, Bryan D. Cox, an ICE spokesman, said in a statement. US Attorney for the Southern District of Mississippi Mike Hurst told reporters that the raids are "believed to be the largest single-state immigration enforcement operation in our nation's history."

Read More