WASHINGTON — Battling with one branch of government and opening a new confrontation with another, President Donald Trump announced Friday he was declaring a national emergency to fulfill his pledge to construct a wall along the U.S.-Mexico border.

Bypassing Congress, which approved far less money for his proposed wall than he had sought, Trump said he would use executive action to siphon billions of dollars from federal military construction and counterdrug efforts for the wall, aides said. The move is already drawing bipartisan criticism on Capitol Hill and expected to face rounds of legal challenges.

Trump made the announcement from the Rose Garden, as he claimed illegal immigration was "an invasion of our country."

Trump's move followed a rare show of bipartisanship when lawmakers voted Thursday to fund large swaths of the government and avoid a repeat of this winter's debilitating five-week government shutdown. The money in the bill for border barriers, about $1.4 billion, is far below the $5.7 billion Trump insisted he needed and would finance just a quarter of the more than 200 miles (322 kilometers) he wanted this year.

To bridge the gap, Trump announced that he will be spending roughly $8 billion on border barriers — combining the money approved by Congress with funding he plans to repurpose through executive actions, including the national emergency. The money is expected to come from funds targeted for military construction and counterdrug efforts, but aides could not immediately specify which military projects would be affected.

Despite widespread opposition in Congress to proclaiming an emergency, including by some Republicans, Trump was responding to pressure to act unilaterally to soothe his conservative base and avoid appearing like he's lost his wall battle.

Word that Trump would declare the emergency prompted condemnations from Democrats and threats of lawsuits from states and others who might lose federal money or said Trump was abusing his authority.

In a sing-songy tone of voice, Trump described how the decision will be challenged and work its way through the courts, including up to the U.S. Supreme Court.

He said, "Sadly, we'll be sued and sadly it will go through a process and happily we'll win, I think."

In an unusual joint statement, House Speaker Nancy Pelosi, D-Calif., and Senate Minority Leader Chuck Schumer, D-N.Y., called it an "unlawful declaration over a crisis that does not exist" and said it "does great violence to our Constitution and makes America less safe, stealing from urgently needed defense funds for the security of our military and our nation. "

"The President's actions clearly violate the Congress's exclusive power of the purse, which our Founders enshrined in the Constitution," they said. "The Congress will defend our constitutional authorities in the Congress, in the Courts, and in the public, using every remedy available."

Democratic state attorneys general said they'd consider legal action to block Trump. Puerto Rico Gov. Ricardo Rossello told the president on Twitter "we'll see you in court" if he made the declaration.

Even if his emergency declaration withstands challenge, Trump is still billions of dollars short of his overall funding needed to build the wall as he promised in 2016. After two years of effort, Trump has not added any new border mileage; all of the construction so far has gone to replacing and repairing existing structures. Ground is expected to be broken in South Texas soon on the first new mileage.

The White House said Trump would not try to redirect federal disaster aid to the wall, a proposal they had considered but rejected over fears of a political blowback.

---

Associated Press writers Lisa Mascaro, Padmananda Rama, Andrew Taylor, Deb Riechmann, Colleen Long, Lolita Baldor and Matthew Daly contributed.