Defense Secretary Jim Mattis denied on Wednesday that the 5,200 active-duty troops being deployed to the Mexico border is a political stunt to help Republicans in the midterm elections.

“The support that we provide to the secretary for homeland security is practical support based on the request from the commissioner of customs and border police, so we don't do stunts in this department,” Mattis told reporters at the Pentagon.

With less than a week until the midterm elections, President Trump has ordered the deployment of the troops in addition to 2,100 National Guardsmen at the border since April because he said a group of migrants walking north through Mexico is a threat to national security.

“We do this following storms, we do this in support of the Department of Homeland Security. This is a different aspect of it, but that's what we are doing,” Mattis said, according to a press pool report.

About 1,800 troops are expected to reach Texas by the end of the week, and the remainder of the force will later arrive and fan out to locations in Arizona, New Mexico, and California.

The deployment has been criticized as a political move aimed at stoking Trump’s Republican base in advance of the election.

Trump has taken an increasingly hard line on immigration as his party faces a tough fight to keep control of the House when voters go to the polls on Tuesday. In recent days, he has vowed to meet the group of 7,000 migrants with military force, claimed the group includes “unknown Middle Easterners,” and threatened to revoke the birthright citizenship law enshrined in the Constitution.

“Our military is being mobilized at the Southern Border. Many more troops coming. We will NOT let these Caravans, which are also made up of some very bad thugs and gang members, into the U.S. Our Border is sacred, must come in legally. TURN AROUND!” Trump tweeted on Wednesday.

[More: Trump: Asylum seekers can expect 'tent cities' upon reaching the US]

So far, the administration has provided little evidence of any threat posed by the group of asylum seekers, who are moving on foot and still potentially weeks away from the border.

Gen. Terrence O'Shaughnessy, the head of U.S. Northern Command who oversees the military border force, declined to say on Tuesday whether any terrorists are in the migrant caravan, and said new information would be released by Customs and Border Protection, which conducts border law enforcement.

“This caravan is different than what we’ve seen in the past and that is one of the things that as we work and train together with CBP to understand the true nature of this caravan and the ultimate effect of the makeup of the caravan,” O’Shaughnessy said.