WASHINGTON — With more than 2,300 U.S. troops still stationed at the southern border, lawmakers pressed Defense Department officials Tuesday to defend the deployment of active-duty members and asked whether President Trump plans on declaring a national emergency so he can use Pentagon funds for a border wall.

“The reason was, in the first place, there was a perceived crisis at the border,” said Rep. Adam Smith (D-Wash.), the new chairman of the House Armed Services panel. “There really isn’t that much evidence of a crisis.”

In the first hearing of the powerful committee since Democrats took control of the House, Smith, citing bipartisan support, cautioned the president against tapping into military money to supply the $5.7 billion he wants for a border wall.

“The real big concern is: Where does he find the money?” Smith asked. “The long-term cost of what he’s talking about is much, much larger…. We should not be taking money out of DOD, out of military construction — well, for a wall or anything else, because we have a readiness challenge. That money needs to be spent there.”

On Friday, Trump signed bills to temporarily reopen the government after the longest government shutdown in U.S. history, but only until Feb. 15. As appropriators in Congress begin negotiations, Trump said he might declare a national emergency if Congress doesn’t provide taxpayer money for the wall.

“After all that I have done … does anybody really think I won’t build the WALL?” Trump tweeted Sunday.

On Jan. 15, the Pentagon announced it had agreed to keep thousands of troops deployed on the border until Sept. 30, again extending a controversial mission that began last fall. About 2,350 troops are deployed to the border, with roughly 600 in Texas, 650 in Arizona and 1,100 in California, mostly at the San Ysidro Port of Entry.

Trump initially sent about 5,900 active-duty troops to assist the Border Patrol on the southwest border a week before the Nov. 6 midterm election, arguing they were necessary to prevent so-called caravans of migrants from Central America from entering the United States.

He used a similar argument for the January extension, with thousands more migrants gathering in Mexico and the government partially shut down, reinforcing criticism that the president is using the Pentagon for political purposes.

Testifying before the House Armed Services Committee on Tuesday, John Rood, the undersecretary of Defense for policy, and Vice Adm. Michael Gilday, the director of operations for the Joint Staff, said the troops’ continued border deployment is necessary.

“The military’s presence and support increases the effectiveness of Customs and Border Protection’s Border Patrol operations,” said Rood, helping the Homeland Security agency “stem the tide” of illegal immigration, human trafficking and illicit drugs.

Before the hearing, when asked by reporters at the Pentagon about the recent buildup of military at the U.S.-Mexico border, acting Defense Secretary Patrick Shanahan emphasized that the troops at the border are merely playing a support role for the Homeland Security Department.

The Pentagon officials estimated that the cost of the active-duty troops’ deployment is about $132 million so far, and about $103 million for the National Guard and reserves, with a projected roughly $550-million price tag for 2019.

The Defense Department is planning to increase the border presence by a few thousand troops, according to Pentagon spokesman Lt. Col. Jamie Davis.

Rep. Mike D. Rogers (R-Ala.) said Congress should better fund the Homeland Security Department “rather than continually reaching into DOD.”

“I’m astounded by the fact that we continue to act stupid in Congress and fuss over $5.7 billion when it cost $11 billion to shut the government down,” he added.

The Congressional Budget Office said Monday that the five-week shutdown cost the U.S. economy $11 billion.

Rep. Mac Thornberry (R-Texas), the panel’s ranking member, said, “I would prefer he not have to resort to DOD to make up for gaps in Homeland Security funding.… But we have to be flexible.”

An analysis by The Times found that, despite spending tens of millions of dollars on hiring since Trump’s January 2017 executive orders to expand the ranks of border agents and immigration officers by 15,000, key Homeland Security agencies are facing steep staffing shortfalls.

Lawmakers raised concerns in the hearing that the troops’ deployment within U.S. borders could strain resources and the military’s preparedness to respond to conflicts abroad.

“There is too much in the world that we need to do, and we don’t have the resources to do all of it,” Smith said. “This is not primary to our mission, and if we start down this road … where does it stop?”

Gilday of the Joint Staff responded that border security and a handful of military commitments abroad are all “high priority” for the Trump administration.

But Gilday emphasized that troops are being quickly rotated in and out at the border, minimizing the effect.

The Defense Department officials said they were engaged in planning around the possibility of Trump’s declaring a national emergency and tapping into either military construction or Army Corps of Engineers funds, but declined to get into any specifics.

“We have limited authority,” Rood said. “Depending on what those authorities are, it would define how much money is available.… We have not made any decision or formalized what that would be.”

Shanahan, the acting Defense secretary, said a national emergency is not “unique and unprecedented.”

“The language is pretty simple,” Shanahan said. “It basically says, to enhance the capability of the military, military construction funds can be utilized.”