WASHINGTON — President Donald Trump on Monday cited the new Democratic House Armed Services Committee chairman’s own words to support the idea of using military funding to build his controversial southern border wall, twisting his political opponent’s message on the problems with making such a move.

In an early morning tweet, Trump noted that Rep. Adam Smith, D-Wash., said the president “can declare an emergency” and order the military to build the border wall under existing U.S. law. Trump added “no doubt, but let’s get our deal done in Congress.”

Smith’s quote came from an appearance on ABC’s “This Week,” where Smith roundly panned the idea.

“There is a provision in law that says the president can declare an emergency,” he said on the program. “It's been done a number of times. But primarily it's been done to build facilities in Afghanistan and Iraq. In this case, I think the president would be wide open to a court challenge saying, where is the emergency.

“But beyond that, this would be a terrible use of Department of Defense dollars. The president spends most of his time talking about how we’re not spending enough on national security, now he wants to take $20 billion out of the defense budget to build a wall, which by the way is not going to improve our border security.”

A dispute between the White House and congressional Democrats over about $5 billion in funding for the wall project has resulted in a 17-day partial government shutdown that has furloughed nearly 400,000 federal workers and forced about the same number to work without pay for weeks.

Last fall, Trump ordered several thousand active-duty U.S. troops deployed to southern states to help support border security missions, an action that political opponents also decried as a misuse of the military.

Trump on Friday for the first time publicly asserted the idea of declaring a national emergency on border security and shifting military funds to the construction project as a way to get around congressional opposition. Democrats immediately attacked the idea.

“The idea that President Trump is considering declaring a phony national emergency as a pretext to take billions of dollars away from our troops and defense priorities in order to pay for his wall should alarm all Americans,” Senate Armed Services Committee Chairman Jack Reed, D-R.I.

“Declaring a trumped up national emergency in order to skirt congressional approval is wrong. And our troops and taxpayers should not bear the burden of a broken, preposterous campaign promise.”

Fellow House Armed Services Committee member Rep. Anthony Brown, D-Md., said Trump would have to establish the issues on the southern border amounted to an imminent wartime threat to use the emergency authority.

“The President’s use of emergency executive authority to divert already-appropriated funding for his own vanity project would be unprecedented, and would undermine important work,” he said.

During an appearance on Fox News Sunday morning, committee ranking member Rep. Mac Thornberry, R-Texas, avoided discussion about the president’s emergency declaration proposal but criticized Democrats for playing politics by not working hard enough to find an end to the government shutdown.

“You need physical barriers, you need people and you need technology,” he said. “The best interests of the country do not seem to be the first consideration. It’s all about political position.”