WASHINGTON Democrats on the House Armed Services Committee hammered Pentagon officials Tuesday on the cost of having nearly 6,000 troops on the US-Mexico border, both in terms of dollars spent and training activities that are disrupted by irregular deployment cycles.

Three months after the Trump administration sent approximately 5,900 troops to back up border patrol agents at the U.S.-Mexico border trying to stop a migrant caravan from entering the U.S., Democratic lawmakers raised concerns over the continued presence of the troops.

Chairman Adam Smith, D-Wash., questioned Pentagon officials on the need for active duty troops at the border, the cost of their operations and the damage to troop training exercises. Smith asked why active duty soldiers are performing tasks to secure the border that are better suited for civilian law enforcement agencies.

In response to a Central American migrant caravan that came to the United States’ southern border in October, the Defense Department sent about 5,900 active duty troops to the southern border at the behest of the Trump administration.

Just over 2,300 active duty soldiers remain at the border now, according to John Rood, under secretary of defense for policy. Rood said the Defense Department is working to reduce the number of troops deployed along the border without sacrificing the integrity of the border’s security.

“We believe border security is enormously important and a challenge,” Smith said. But, he added, statistics show the peak of the country’s immigration surge at the border was in 2004 and 2005 when there were over 1 million annual applications to enter the country compared with less than 400,000 a year now.

Among their duties, the troops are erecting 150 more miles of concertina wire to reinforce the 70 miles of wire placed at the 22 ports of entry along the four southern states, according to Vice Admiral Michael Gilday.

Smith said the Defense Department has a “readiness” problem with many troops lacking necessary continuous training.He also opposed using Pentagon funds to pay for a $5.7 billion wall if Trump were to declare a national emergency.

The National Guard troops that Trump ordered to the border in April 2018 are still there at a cost of about $515 million, Smith said.

The guard and active-duty military personnel “increase the effectiveness of CBP’s border security operations, free U.S. Border Patrol agents to conduct law enforcement duties at the southern border, and enhance situational awareness to stem the tide of illegal immigration, human smuggling, and drug trafficking along the southern border,” Rood said.

Rep. Mike Rogers, R-Ala., told Democrats that if they wanted the Defense Department to pull its military presence from the border, then they should “adequately” fund the Department of Homeland Security so its operations don’t need to be subsidized by the Defense Department.

The deployment of troops at the southern border is scheduled to end Thursday, although some troops will remain until Sept. 30 – the end of the fiscal year, Defense Department officials said.