The military’s border mission was slated to end Dec. 15, but the White House and the Department of Homeland Security had requested to continue using the troops as an additional bulwark against migrants from Central America entering the United States.

The requests came after Border Patrol agents fired tear gas at migrants trying to illegally enter the United States from Tijuana, Mexico.

The extended deployment would include aviation, medical, engineering and military police support, a Defense Department official said on Tuesday. That includes military planes to transport Border Patrol staff and setting up additional concertina wire.

While a small number of the 5,900 American troops deployed to Arizona, California and Texas have begun to return home, most will remain over the Christmas holiday, officials said.

The troops are spread across a constellation of small bases where they spent the initial weeks of their deployment setting up concertina wire and other security barriers. But in the last week, they have begun to give rides to Border Patrol agents and to train them in providing additional support to the Homeland Security staff along the border, according to military officials.

Last month, President Trump called for up to 15,000 troops to guard the border against several approaching migrant caravans. The 5,900 sent by the Pentagon cost at least $72 million.