Defense Secretary Jim Mattis and Homeland Security Secretary Kirstjen Nielsen visited U.S. troops at the U.S.-Mexico border Wednesday.
Mattis said the reason for the trip was to see how the deployed troops are doing.
President Donald Trump ordered thousands of troops to the region ahead of the midterm elections as a caravan of asylum-seekers traveled north through Mexico.
Critics of the deployment have questioned the cost and potentially politically-charged reasoning behind having an added military presence there.
Mattis said he doesn't anticipate the troops having any direct contact with migrants. He also defended the deployment decision, telling military personnel to stay focused on their mission.
"Border security is part of national security. Our units are in a position to enable the Border Patrol's law enforcement operations," he said. "We determined that that mission was absolutely legal, and this was also reviewed by Department of Justice lawyers. It's obviously a moral and ethical mission to support our border patrolmen."
The defense secretary also noted that military has been sent to the U.S.-Mexico border by "four administrations and both political parties" since the early 20th century.
Additional reporting from Newsy affiliate CNN.