WASHINGTON — President Donald Trump declared a national emergency on Friday in an effort to circumvent Congress and fund the wall he promised to build along the U.S. border with Mexico.

"We’re talking about an invasion of our country with drugs, with human traffickers with all types of criminals and gangs," Trump said in remarks delivered in the White House Rose Garden just before he issued the order.

But he seemed to undercut the theme of urgency when he took questions later, telling NBC's Peter Alexander that the move wasn't really necessary.

"I could do the wall over a longer period of time," he said. "I didn't need to do this, but I'd rather do it much faster."

The controversial executive action — which Trump acknowledged would draw lawsuits — came the day after Congress cleared a bill for his signature that prevents a second government shutdown in two months and provides just under $1.4 billion for 55 miles of new fencing along the border. Trump has indicated he will sign the bill, which passed with veto-proof majorities in both chambers, despite pressure from some conservatives to veto it because of its limitations on the type and length of barrier that can be built.

"The current situation at the southern border presents a border security and humanitarian crisis that threatens core national security interests and constitutes a national emergency. The southern border is a major entry point for criminals, gang members, and illicit narcotics," Trump said in the proclamation, released later in the afternoon, when he also signed the appropriations measures. "Because of the gravity of the current emergency situation, it is necessary for the Armed Forces to provide additional support to address the crisis."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Trump addressed the voices of dissent on his right flank in his Friday morning remarks, saying that conservative commentator and sometime critic of his approach Ann Coulter is "off the reservation." He also said that allies like Fox's Sean Hannity and radio talk show host Rush Limbaugh have his ear but "they don't decide policy."

The emergency declaration could allow him to spend money on barriers from a variety of accounts, including the $1.4 billion in the appropriations bill, if his actions clear legal hurdles.

Democratic leaders in Congress quickly vowed to fight Trump on what they said was an overstep of his authority.

"The president's actions clearly violate the Congress’s exclusive power of the purse, which our Founders enshrined in the Constitution," Speaker Nancy Pelosi, D-Calif., and Senate Minority Leader Chuck Schumer, D-N.Y., said in a joint statement. "The Congress will defend our constitutional authorities in the Congress, in the Courts, and in the public, using every remedy available."

Rep. Joaquin Castro, D-Texas, told NBC Thursday night that he planned to introduce a joint resolution terminating the national emergency, but that would not take effect unless both chambers of Congress passed it and either the president signed it or Congress overrode a veto.

Trump, who spoke without the aid of a teleprompter, appeared to have difficulty staying focused on the task at hand during lengthy remarks that veered from trade relations with China and his upcoming summit with North Korean leader Kim Jong Un to the state of the economy. He did not provide all of the details of his border plan.

But senior administration officials said Friday that with the declaration, Trump will have access to a total of $8 billion for the wall. That figure includes $1.375 billion offered by Congress in the spending bill for fencing in Texas; $600 million from the Treasury Department’s drug forfeiture fund; $2.5 billion from a Defense Department drug interdiction program; and $3.5 billion from a military construction budget under an emergency declaration by the president.

He got swift support from traditional allies, including Jenny Beth Martin, honorary chair of the Tea Party Patriots Action group.

"We applaud President Trump for working to keep his promise to the American people and fighting to make our country safe and secure," Martin said in a statement.

Trump has said for weeks that he was considering using his national emergency powers to unlock funds for his wall, despite originally vowing that Mexico would pay for it.

News of Trump's plan to declare a national emergency was met with swift criticism from lawmakers in both parties Thursday, with Sen. John Cornyn, R-Texas, calling it a "dangerous step."

Several Republicans have warned that a Democratic president could follow suit and use a national emergency declaration to fund liberal priorities in the future, and many lawmakers in both parties regard the prospect of a president shifting billions of dollars of funding into a new project as a worrisome precedent even if the courts uphold the plan.

John Paul Woodley Jr., a former assistant secretary of the Army for civil works, said in an interview before the announcement that he's not aware of any prior effort by an administration to transfer money on such a large scale. In the past, said Woodley, who oversaw the Army Corps of Engineers, relatively small sums — "in the millions, not in the billions" — have been moved to address natural disasters.

"Congress regards — particularly the appropriations committees regard — any reprogramming, however small, as a very serious matter," he said.