Rep. Adam Smith (D., Wash.) on Sunday admitted that President Donald Trump has the authority to use the U.S. military to build a wall on the U.S.-Mexico border.

Smith, the chairman of the House Armed Service Committee, appeared on ABC's "This Week" to talk about the government shutdown and wall funding.

"Does President Trump have the ability, have the authority to declare a national emergency and have the military build his wall?" host George Stephanopoulos asked.

"Well, unfortunately, the short answer is yes. There is a provision in the law that says the president can declare an emergency. It’s been done a number of times, but primarily it's been done to build facilities in Afghanistan and Iraq. And in this case, I think the president would be wide-open to a court challenge saying, ‘Where's the emergency?'" Smith said.

Trump was asked on Friday whether he had considered using emergency powers to direct the military to build the wall without congressional approval.

"We can call a national emergency because of the security … I haven't done it. I may do it but we can call a national emergency and build it very quickly," he said.

Smith went on to say that if Trump used this authority, it would be "terrible use of Department of Defense dollars." He said taking $20 billion out of the defense budget would be a waste of money because he doesn't believe it will improve border security.

"All border security experts that I talk to say where a wall makes sense has already been built," Smith said. "We should have a conversation about border security, but first we should reopen the government and start paying our border patrol agents and the other 800,000 federal employees who are furloughed."