WASHINGTON — Texas' homeland security chief lauded the deployment of National Guard troops to the border on Thursday, telling Congress the situation remains dire even as questions mount about the costs, lack of planning and impact on military readiness.

Other experts — and Democratic lawmakers — argued that President Donald Trump and his aides have been crafting justification for the deployment on the fly, and only after a hasty decision by Trump prompted by Congress refusing to fund a proposed border wall.

"Obviously the Texas-Mexico border is unsecure. ... If you've got a drug problem, you have a cartel problem, you've got an unsecure border problem. If you have a MS-13 problem in New York, you have a border problem," Steve McCraw, director of the Texas Department of Public Safety, testified at a House oversight and government affairs hearing. "As Texas goes, so goes the nation."

Gov. Greg Abbott readily agreed to Trump's National Guard request last week. So did Republican governors in Arizona and New Mexico. California's Gov. Jerry Brown, a Democrat, agreed to provide guardsmen in a more limited role.

Trump cited a caravan of Central American protesters that marched north through Mexico as justification for sending 2,000 to 4,000 troops to the border. Most of the marchers never intended to attempt to cross, and the caravan has largely dispersed. The annual event is meant to raise awareness for migrant workers, although some anti-immigrant advocates have depicted it as a sort of invasion force.

Trump said he will keep troops at the border until Congress approves a wall. He has sought $25 billion for the proposal and so far gotten about $1.9 billion. Guard units work at the direction of governors but with federal funds, and Defense Secretary Jim Mattis has directed aides to find ways to shift Pentagon money to the new mission.

Last week, House Armed Services Chairman Mac Thornberry, R-Clarendon, expressed concerns about the impact on other Pentagon priorities. The budget Trump signed last month includes $700 billion for defense — funds that he and defense hawks such as Thornberry insisted were needed to rebuild military capacity.

"If you take money away, you can't do some of those things that you were trying to do, like add pilots or repair the ships or those sorts of things," Thornberry told the Wichita Falls Times Record News. "I fully support doing more at the border, but we don't need to rob the military."

Michael Breen, president of the center-left Truman Center and Truman National Security project, testified at Thursday's hearing that while border security is essential, "It is not at this time, definitively not, a military problem."

Nor, he said, is there any sign of a "deliberative planning process" behind Trump's surprise decision to order National Guard to the border.

Breen said the deployment will certainly cost hundreds of millions, and "Congress should ask hard questions about the impact on readiness for combat. ... There's a great danger when policymakers reach for the military as a Band-Aid to solve problems in other areas of government."

Rep. Ron DeSantis, R-Fla., chairman of the subcommittee that held Thursday's hearing, also cited the caravan, asserting that it "reminds us of how porous our borders still are, with people and drugs being smuggled in daily."

"For far too long, Mexico has been derelict in its duty" to block illegal immigration, he said. "It took courage to mobilize the National Guard," though he added, "We all know the National Guard cannot serve in this capacity indefinitely."

Republicans on the panel pressed concerns about immigration run amok.

"Every place in the country is overrun, it seems to me, with illegal immigrants," said Rep. John Duncan, R-Tenn.

Democrats cited figures suggesting otherwise. The Border Patrol's budget has roughly tripled since 2001, and illegal crossings have plummeted. Apprehensions at the border have dropped from about 1 million in 2006 to 400,000 in 2010, hitting a record low last year of 310,000, the least since 1971.

"The deployment of our National Guard units to our Southwest border appears to be indefinite. It also appears to be largely undefined in terms of scope and cost," said Rep. Stephen Lynch of Massachusetts, the panel's top Democrat.

McCraw noted that the state of Texas — and its taxpayers — have spent billions to supplement federal border security in recent years, with state police and National Guard helping the U.S. Border Patrol "to deter, detect and interdict smuggling incidents between the ports of entry" with more than 1,000 state troopers, nine helicopters, four planes and 13 tactical boats.

The Border Patrol doesn't have enough assets to do its work without such help, he said — echoing a point made by Brandon Judd, head of the National Border Patrol Council, a union representing Border Patrol officers.

"In terms of where the funding comes from — that's way above my pay grade," McCraw told lawmakers. "I'm sure you can figure it out if you wanted to."

Judd testified that current staffing levels at the Border Patrol make it impossible to fully secure the border. He blamed challenges with recruiting and retention, and mismanagement that means only a fraction of the force is actually in the field in key sectors.

On Thursday, House Democrats wrote Mattis and Homeland Security Secretary Kirstjen Nielsen, demanding an explanation for the sudden deployment.

"Border security has been a rigorously discussed topic over the past year," they wrote. "We are surprised and puzzled as to why neither of you nor other members of the Administration mentioned a possible deployment of the National Guard to the southern border before."