U.S. Defense Secretary Jim Mattis defended the deployment of thousands of troops to the border with Mexico as he traveled there on Wednesday, saying the mission was "absolutely legal" and justified, and that it was improving military readiness.

President Donald Trump's politically charged decision to send U.S. troops to the Mexico border came ahead of U.S. midterm congressional elections last week, as Trump sought to strengthen border security as part of a crackdown on illegal immigration.

Trump's supporters, including Republicans in Congress, have embraced the deployment.