WASHINGTON (Reuters) - U.S. Defense Secretary Jim Mattis on Wednesday rejected criticism that deploying thousands of troops to the border with Mexico was a political stunt.

“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 said after a meeting with his South Korean counterpart at the Pentagon.

Several groups including the American Civil Liberties Union have accused President Donald Trump of politicizing the military ahead of next week’s midterm elections.

Trump has hardened his stance on immigration ahead of the Nov. 6 congressional elections. He has drawn attention to a caravan of migrants that is trekking through Mexico toward the United States as he seeks to fire up support for fellow Republicans in campaign battles with Democrats who are trying to wrest control of the U.S. House of Representatives and the Senate.

Republican lawmakers and other Trump supporters have applauded the deployment. But critics say Trump is politicizing the military, deploying them as a stunt to drive Republican voters to the polls without any real national security threat.

“The move to send 5,200 active duty troops to the southern border is a craven political stunt that sets a bad precedent and is arguably an abuse of power,” Kelly Magsamen, a former senior Pentagon official, said. She is currently with the Center for American Progress think tank.

The deployment will create an active-duty force comparable in size to the U.S. military contingent in Iraq.

Trump’s decision to call in the military appears to be a departure from past practice. At least in recent years, such operations were carried out by National Guard forces, largely part-time military members often called upon in response to domestic emergencies.

A U.S. official told Reuters that as of Wednesday the Pentagon had identified about 7,000 active-duty troops, which included about 2,000 on standby, that could be deployed to the border with Mexico if needed.

On Tuesday, the top U.S. general overseeing a deployment of more than 5,200 troops to the border said troop levels would rise further, but declined to say how high or estimate what the operation will cost.

Many basic questions remained unanswered days after the Pentagon announcement, including the scope of the mission as well as the Pentagon’s assessment of any threat posed by arriving migrants.

(This version of the story has been refiled to fix garbled word order in last sentence of paragraph 6)