(AP) - The Senate resoundingly approved a border security compromise Thursday that ignores most of President Donald Trump's demands for building a wall with Mexico but would prevent a new government shutdown. The White House said Trump, as he's suggested for weeks, would quickly declare a national emergency and perhaps invoke other executive powers to try to shift money to wall-building from elsewhere in the federal budget.
House passage and Trump's signature were assured, which for now would stamp a bipartisan coda on a nasty melee that's dominated the initial months of power sharing in Washington.
The specter of the national-emergency declaration has produced widespread opposition in Congress, but Trump is under pressure to soothe his conservative base and avoid looking like he's surrendered in his wall battle with Congress.
At the White House, Press Secretary Sarah Sanders said Trump would sign the bill and take "other executive action, including a national emergency." She added, "The president is once again delivering on his promise to build the wall, protect the border, and secure our great country."
Trump had demanded $5.7 billion to start building more than 200 miles of wall. The bipartisan agreement provides under $1.4 billion - enough for just 55 miles of new barriers and fencing.
An emergency declaration and other assertions of executive power to access money are expected to prompt lawsuits and potential votes in Congress aimed at blocking Trump from diverting money, which could conceivably reach billions of dollars. White House aides and congressional Republicans have suggested Trump might tap funds targeted for military construction, disaster relief and counterdrug efforts.
In a surprising development, Senate Majority Leader Mitch McConnell said he would support Trump's emergency declaration. That was a turnabout for the Kentucky Republican, who like Democrats and many Republicans has until now opposed such action.
Democratic opponents of a declaration have said there is no crisis at the border and Trump is merely sidestepping Congress, while Republicans have warned that future Democratic presidents could use the move to force spending on their own priorities like gun control.
But lawmakers from both parties were openly relieved to forestall a fresh federal shutdown and put the border security battle - at least this phase of it - behind them.
Meeting with reporters, House Speaker Nancy Pelosi, warned that legal action aimed at blocking Trump's emergency declaration was an option, but she stopped short of saying it would definitely occur.
"The president is trying to make an end run around Congress," said Pelosi, D-Calif. She added, "It's not an emergency what's happening at the border It's a humanitarian challenge to us."
No. 2 House Democratic leader Steny Hoyer, D-Md., was more definitive. "House Democrats will challenge this irresponsible declaration," he said in a statement.
The Senate approved the border security deal by a lopsided 83-16 tally. The House planned to vote on passage in the evening.
Trump's signature will end this stage of a raucous legislative saga that commenced before Christmas and was ending, almost fittingly, on Valentine's Day. The low point was the historically long 35-day partial federal shutdown, which Trump sparked and was in full force when Democrats took control of the House, compelling him to share power for the first time.
Trump yielded on the shutdown Jan. 25 after public opinion turned against him and congressional Republicans. He'd won not a nickel of the $5.7 billion he'd demanded for his wall but had caused missed paychecks for legions of federal workers and contractors and lost government services for countless others. It was a political fiasco for Trump and an early triumph for Pelosi.
The fight left both parties dead set against another shutdown. That sentiment weakened Trump's hand and fueled the bipartisan deal, a pact that contrasts with the parties' still-raging differences over health care, taxes and investigations of the president.
Notably, the word "wall" - which fueled many a chant at Trump campaign events and then his rallies as president - does not appear once in the compromise's 1,768 pages of legislation and explanatory materials. "Barriers" and "fencing" are the nouns of choice.
The pact would also squeeze funding for Immigration and Customs Enforcement, or ICE, in an attempt to pressure the agency to gradually detain fewer immigrants. To the dismay of Democrats, it would still leave an agency many of them consider abusive holding thousands more immigrants than it did last year.
The measure contains money for improved surveillance equipment, more customs agents and humanitarian aid for detained immigrants. The overall bill also provides $330 billion to finance dozens of federal programs for the rest of the year, one-fourth of federal agency budgets.
The agreement was expected to be carried by pragmatists from both parties. Many of Congress' most liberal members were expected to oppose it, unwilling to yield an inch to Trump's anti-immigrant policies, while staunch conservatives preferred a bill that would go further.
"I made a promise to my community that I wouldn't fund ICE," said Rep. Alexandria Ocasio-Cortez, D-N.Y., a freshman who's become a face of her party's left wing and a leading proponent of eliminating the agency.
Swallowing the deal would mark a major concession by Trump, who has spent months calling the situation at the southern border a national security crisis. In private conversations, Trump has called the congressional bargainers poor negotiators, said a person familiar with the conversations who wasn't authorized to speak publicly.
Trump has repeatedly vowed Mexico would pay for the wall, a suggestion that country has spurned. His descriptions of the wall's size have fluctuated, at times saying it would cover 1,000 of the 2,000-mile boundary. Previous administrations constructed over 650 miles of barriers.
Facing opposition from Trump, Democrats lost their bid to include language giving federal contractors back pay for wages lost during the last shutdown. Government workers have been paid for time they were furloughed or worked without paychecks.
Also omitted was an extension of the Violence Against Women Act. Democrats say this will give them a chance later this year to add protections for transgender people to that law.
(Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)