WASHINGTON — Defense Secretary Jim Mattis on Wednesday defended the use of active duty troops on the U.S.-Mexican border, saying that in some ways it provides good training for war. He argued that it's analogous to a 1916 deployment to counter the Mexican revolutionary Gen. Francisco "Pancho" Villa.

Speaking to reporters on his way to visit U.S. troops along the border in south Texas, Mattis declined to provide an estimate of how much the mission will cost. He said cost figures he has received thus are "not anywhere near right." He added that he believes, "very quickly we'll know the real cost. So we'll keep you posted as the real costs come in."

The Pentagon chief said that within a week to 10 days the 5,800 troops currently deployed for the border mission will have accomplished all the tasks initially requested by Customs and Border Protection, although additional tasks are now being worked out between the Pentagon and the Department of Homeland Security. Mattis did not say how soon the whole mission might end; current deployments are scheduled to last until Dec. 15, but that could change.

In addition to the 5,800 active duty troops in the border area, about 2,100 National Guard troops have been providing border support since April.

Critics have questioned the wisdom of using the military on the border where there is no discernible security threat, although President Donald Trump has said that a caravan of Central American migrants traveling northward through Mexico amounts to an "invasion." Since the election, Trump has said little about the matter, and no border threat has yet materialized.

Asked whether he believes there is a security threat at the border that justifies the use of the active duty military, Mattis said he defers to the judgment of Homeland Security Secretary Kirstjen Nielsen, whom he met with at the border Wednesday.

Nielsen and Mattis spoke with senior U.S. commanders and addressed rank-and-file troops. Mattis told the troops their mission is to "back up" Customs and Border Protection. "Right now that's our role and that's all our role is," he said.