WASHINGTON—President Trump plans to sign a spending bill that keeps the government open and will then declare a national emergency to seek more border-wall funding, the White House said, ending the suspense over a possible second shutdown but kicking off a new fight.

News of Mr. Trump’s stance, announced after a phone call with Senate Majority Leader Mitch McConnell (R., Ky.), ended a period of limbo in Congress as lawmakers waited anxiously to hear whether the president would sign the sweeping spending bill into law. The House approved the bill late Thursday, hours after its passage in the Senate, sending the legislation to the president’s desk. The White House said Mr. Trump is scheduled to make remarks about border security at 10 a.m. on Friday.

The $333 billion package of seven spending bills includes $1.38 billion in funding for 55 new miles of physical barriers—far less than the $5.7 billion Mr. Trump had asked for. Mr. Trump hadn’t said previously whether he planned to support the package, but people close to him had said they expected him to sign it despite disappointment about the amount of barrier funding.

The president’s push for $5.7 billion in border-wall funding led to the five-week government shutdown, the longest in U.S. history, that ended last month.

Declaring an emergency could potentially enable Mr. Trump to shift either military-construction or U.S. Army Corps of Engineers funding to build more border barriers.