Defense Secretary Jim Mattis said Wednesday that the military operation to harden the US-Mexico frontier was clearly necessary, as he visited troops deployed on the controversial mission.
President Donald Trump ordered the deployment in the build-up to last week's midterm elections, with critics assailing the move as a costly political stunt to mobilize his conservative base.
According to Mattis, some 5,900 troops are now at the border. The mission could see upwards of about 9,000 active-duty and reserve troops.
The Pentagon chief said the military was needed to provide vital support to short-handed border patrol agents ahead of the anticipated arrival of large groups of migrants in so-called "caravans."
"I think that it's very clear that support to border police or Border Patrol is necessary right now," he told reporters traveling with him as he headed to Base Camp Donna in Texas.
He said border agents need help with everything from laying barbed wire to being ferried around the frontier by helicopter, adding that the mission provided useful training to troops and enhanced their military readiness.
"We determined that the mission was absolutely legal," Mattis said.
"It's obviously a moral and ethical mission to support our border patrolmen."
Critics have said the deployment is a waste of money and is not needed, especially as its focus is on preventing a main caravan of migrants that might not even reach the border until after the mission wraps up on December 15.
That caravan left San Pedro Sula, Honduras, on October 13 and has covered more than 1,500 kilometers (930 miles) so far.
The pace picked up Wednesday as migrants were being ferried on buses toward Tijuana, where hundreds of arriving migrants have begun to gather.
At least two other caravans have since been established, defying threats from Trump -- who has decried what he describes as an "invasion."
The Pentagon still has not provided a cost estimate for the mission, but US media say it could stretch well beyond $200 million.
Republican Senator Jeff Flake told MSNBC on Wednesday that the deployment was merely political.
"It's unfortunate that we have soldiers there," he told the network.
"You can't call it anything but a stunt here, and it's unfortunate that they are going to be away from family during the holidays coming up and we just don't know what really for."
Mattis last month said the Pentagon doesn't "do stunts."
The US military has often deployed to the southern border, he said, including about a century ago to protect against raids from Pancho Villa and his Mexican revolutionaries.