All of the 5,800 active duty military troops President Trump ordered deployed to the border with Mexico to confront the migrants attempting to enter the U.S. from Central America will be home by Christmas, a top Army commander confirmed Monday.

The Pentagon could begin drawing down its troop levels at the border as early as next week, Army Lt. Gen. Jeffrey Buchanan, who oversees the mission on the southern border, told Politico. His comments came just hours after the U.S. was forced to partially close its busiest Mexican border crossing at Tijuana, Mexico to install additional security measures.

"Our end date right now is 15 December, and I've got no indications from anybody that we'll go beyond that," Buchanan said.

He also confirmed that the Pentagon had rejected a Department of Homeland Security request for armed troops to back up Border Patrol authorities, saying that was a law enforcement function that the military cannot legally provide.

HOMELAND SECURITY: MIGRANT CARAVAN HARBORING MORE THAN 500 CRIMINALS

Operations officials at United States Army North, which Buchanan commands, did not immediately return Fox News' request for clarifications on the timeline of the troop drawdown.

The largest troop deployment to the border has mostly involved engineers installing and enhancing security measures, and the military has said in the past several days that it expected that work to conclude soon.

“Once we get the rest of the obstacles built, we don’t need to keep all those engineers here. As soon as I’m done with a capability, what I intend to do is redeploy it,” Buchanan said in the interview. “I don’t want to keep these guys on just to keep them on. ... Now that things are set down here, we don’t need as many troops to actually build base camps and things like that, because the base camps are built."

However, on Thursday, Deputy Defense Secretary Patrick Shanahan told reporters at the Pentagon that date "could always be amended." Some quick-response troops will remain longer as engineers begin to head back home, Buchanan said.

But even as troop levels are apparently set to decline, tension has ratcheted up on the border. The nearly 3,000 people who reached the Mexican border with California in recent days have been met with marked hostility.

On Saturday, about 400 Tijuana residents waved Mexican flags, sang the Mexican national anthem and chanted “Out! Out!” referring to the migrant caravan that arrived in the border city last week.

"Our end date right now is 15 December, and I've got no indications from anybody that we'll go beyond that." — Army Lt. Gen. Jeffrey Buchanan

On Monday, the U.S. closed off northbound traffic for several hours at the busiest border crossing with Mexico to install new security barriers, and also closed one of two pedestrian crossings at the San Ysidro crossing in a move apparently aimed at preventing any mass rush of migrants across the border.

U.S. border inspectors are processing only about 100 asylum claims a day at Tijuana’s main crossing to San Diego. Asylum seekers register their names in a tattered notebook managed by migrants themselves that had more than 3,000 names even before the caravan arrived.

Some Tijuana residents supported the migrants, but many complained about how the caravan forced its way into Mexico, echoing President Trump's rhetoric and calling it an “invasion.” And they voiced worries that their taxes might be spent to care for the group.

TIJUANA RESIDENTS PUSH BACK AGGRESSIVELY AS CARAVAN MIGRANTS ARRIVE

The majority of migrants, who have been on foot for more than a month, are sleeping on a dirt baseball field at an outdoor sports complex in Tijuana by the newly-fortified barbed wire fence that separates Mexico from the United States. A truck parked on the street is providing showers for women, while the men are told to use newly established outdoor showers near the field.

Alden Rivera, the Honduran ambassador in Mexico, has said 1,800 Hondurans have returned to their country since the caravan first set out on Oct. 13, and that he hopes more will make that decision.

The Mexican Interior Ministry reported Friday that 2,697 Central American migrants have requested asylum in Mexico under a program that the country launched on Oct. 26 to more quickly get them credentials needed to live, work and study in southern Mexico.

The angry reception at Tijuana has left many in limbo – afraid to return to their homeland, which for the vast majority is Honduras, yet unwelcome in Mexico and uncertain if their U.S. asylum requests will be granted. The U.S is said to be processing around 100 claims per day.

Tijuana Mayor Juan Manuel Gastelum has referred to the arrivals as “bums” and questioned whether a referendum in the city of 1.6 million is needed to determine whether or not they should be allowed to stay.

“Human rights should be reserved for righteous humans,” Gastelum said last week.

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.

Asked whether he believes there is a security threat at the border that justifies the use of the active duty military, Defense Secretary James Mattis said this week that he defers to the judgment of Homeland Security Secretary Kirstjen Nielsen, who joined him at the border Wednesday to speak with senior U.S. commanders and address rank-and-file troops.

Mattis said the short-term objective is to get sufficient numbers of wire and other barriers in place along the border as requested by Customs and Border Protection. The longer-term objective, he said, is "somewhat to be determined."

Mattis said the mission, which does not include performing law enforcement tasks, was reviewed by Department of Justice lawyers and deemed a legal undertaking. "It's obviously a moral and ethical mission to support our border patrolmen," he said.

"The eyes of the world right now — certainly all of the Americans — are on you," Mattis told the soldiers he met with, adding that they are part of a "non-traditional" mission. "We're here because of the number of illegals who say they are going to illegally try to cross into our country."

Fox News' Hollie McKay and The Associated Press contributed to this report.