The declaration came after the president agreed to a massive bipartisan spending measure

President Donald Trump, citing an "invasion" of drugs and criminals, declared a national emergency at the US-Mexico border on Friday to fund construction of his long-sought wall, a move slammed by Democrats as an unlawful "power grab."

Trump's extraordinary step will enable him to bypass congressional opposition and seek to redirect billions of dollars in federal funds to build the wall -- delivering on a key election promise to his right-wing base.

"We are going to confront the national security crisis on our southern border and we are going to do it one way or the other," Trump told reporters in the Rose Garden of the White House.

"I am going to be signing a national emergency," said the US leader. "We are talking about an invasion of our country, with drugs, with human traffickers, with all types of criminals and gangs."

Trump's decision to resort to emergency powers -- after a bitter standoff with Democrats blocking his wall project culminated in a 35-day government shutdown -- has alarmed lawmakers, including in his Republican Party, who warn it sets a dangerous precedent.

The declaration came after the president agreed to a massive bipartisan spending measure that averts the possibility of a second crippling shutdown.

But House Speaker Nancy Pelosi and Senate Minority Leader Chuck Schumer, the Democratic leaders in Congress, immediately denounced a "power grab" by a president "who has gone outside the bounds of the law" to fund his 2016 campaign pledge to build the wall.

New York State's attorney general, Letitia James, announced the first of what were expected to be a slew of legal challenges, warning a national emergency without legitimate cause could create a constitutional crisis, and vowing to "fight back with every legal tool at our disposal."

Trump said he fully expected to be challenged in court -- but voiced confidence he would prevail.

"Look, I expect to be sued," he said bluntly. "Sadly it will go through a process and happily, we'll win, I think."

- No $5.7 billion -

Trump's announcement, which opens a new confrontation with lawmakers and creates risky legal peril, comes after he reluctantly agreed to a measure keeping federal agencies operational through September 30 -- but without the funding he sought for a border wall.

That deal caps a two-month battle over border money which Democrats are widely seen as having won.

Trump has long demanded $5.7 billion to build portions of a wall on the 2,000-mile (3,200-kilometer) southern border. But Congress provided just $1.375 billion for border barriers, and not specifically a wall, in the bill.

Under the National Emergencies Act, the president can declare a national emergency, providing a specific reason for it.

That allows the activation of any of hundreds of dormant emergency powers under other laws, which can permit the White House to declare martial law, suspend civil liberties, expand the military, seize property and restrict trade, communications and financial transactions.

Recent presidents -- and Trump too -- have used emergency powers on such issues. But the prospect of Trump using the authority to raid government accounts for the funding of a wall sounded alarm bells on Capitol Hill.

"I'm just saying that the Republicans should have some dismay about the door that they are opening, the threshold they are crossing," Pelosi said Thursday.

Senate Majority Leader Mitch McConnell has backed the president over the emergency, but other Republicans voiced reservations including veteran Senator Chuck Grassley who warned of a worrying precedent.

Article 1 of the US Constitution states Congress gets to decide how money is appropriated. Many lawmakers have said they have no idea where Trump will draw the funding from.

Democrats have signaled the move would open the door to future presidents declaring emergencies on anything from gun violence to climate change to the opioid crisis.

Court challenges aside, the Democratic chair of the House Judiciary Committee, Jerry Nadler, expressed support for a congressional resolution of disapproval to "terminate" Trump's emergency declaration.

Such a move has a chance of passing both chambers of Congress, but Trump would almost certainly veto it.

Moments before his announcement, Trump met with so-called "angel moms," women whose children were victims of crimes committed by undocumented immigrants and whose plight the White House has spotlighted in its push on border security.

Holding large photographs of their children, they joined Trump in the Rose Garden, where he asked some of them to stand as he highlighted their stories.