WASHINGTON — In pursuit of a wall, President Trump ran into one. A single-minded drive to force Congress to finance his signature campaign promise has left Mr. Trump right back where he started, this time seeking a way to climb over the political barrier in his way after trying to charge through it did not work.
As he inched closer to reluctantly accepting a bipartisan spending compromise without the money he demanded for his border wall, Mr. Trump offered no acknowledgment on Wednesday that his pressure tactics had failed even as aides sought to minimize the damage by tamping down criticism on the right.
One call was made to Lou Dobbs, a favorite of Mr. Trump’s whose Fox Business Network show he often tries to catch live. Another was placed to Sean Hannity, the Fox host who regularly talks with the president. The message: Mr. Trump deserved support because he still forced concessions that he would never have gotten without a five-week partial government shutdown.
Even so, it was arguably the most punishing defeat Mr. Trump has experienced as president, and it left the White House scrounging for other ways to pay for a wall on the southwestern border and rethinking its approach to a Congress now partly controlled by Democrats. Mr. Trump’s inability to reach a satisfying deal despite the negotiating experience he regularly touted on the campaign trail suggested that any aspirations of collaboration across party lines may be even more elusive than he had imagined.
“We shut down the government for 35 days, we put America through this crisis, we jeopardized our economy — for what?” said Senator Richard J. Durbin of Illinois, the second-ranking Democrat in the upper chamber and a member of the House-Senate committee that negotiated this week’s spending deal. “Totally unnecessary.”
The agreement that lawmakers produced this week would allocate $ 1.375 billion for fencing along the border, even less than was on the table at one point last year. The Senate plans to vote on the measure on Thursday, followed by the House. Mr. Trump would not say whether he would sign it, but he seemed to be leaning toward it in the interest of avoiding another government shutdown at midnight Friday.
“With the wall, they want to be stingy,” Mr. Trump complained about Speaker Nancy Pelosi and other congressional Democrats during an encounter with reporters on Wednesday. “But we have options that most people don’t really understand.”
Those options involve diverting money from other programs and potentially declaring a national emergency to access further funds. In the end, aides said, Mr. Trump may even secure more money than Congress denied him. But those options were just as available to Mr. Trump in December before the showdown that closed federal agencies.
While acknowledging disappointment in the agreement, the president and his aides characterized it as better than it seemed, citing money it will provide for overall border security. Mr. Trump argued that the shutdown had been useful because it educated the country about troubles at the border and, if nothing else, he has framed the national debate on his terms.
That did not completely assuage conservatives. Representative Mark Meadows, Republican of North Carolina and the chairman of the House Freedom Caucus, contradicted the White House line and declared that the agreement was “a bad deal for the president.”
“Only in Washington, D.C., can we start out with needing $ 25 billion for border security measures and expect applause at 1.37,” he said Tuesday on Fox News. “I mean, only in D.C. is that a winning deal.”
Mr. Meadows and his allies were among those targeted by the White House in hopes of avoiding a more threatening conservative revolt. A meeting with members of his Freedom Caucus in the Oval Office was partly aimed at urging them to hold their fire in television interviews when talking about the bill, according to a person briefed on the effort.
And indeed, despite his complaints about the bill, Mr. Meadows made a point on Wednesday of not blaming Mr. Trump. “I think he handled it as well as anybody could handle it, given a dysfunctional Congress,” Mr. Meadows told reporters.
Among those involved in the outreach, according to the person briefed on the discussions, was Bill Shine, a White House deputy chief of staff and former Fox executive who in the West Wing is seen as adept at getting some hosts at Fox to respond to White House concerns.
Since coming to office, Mr. Trump has missed several opportunities to make more progress on the wall. Instead of Mexico directly paying for a $ 25 billion, 1,000-mile concrete barrier, as the president once said would happen, he has been seeking partial installments from Congress, arguing that his new trade agreement with Mexico will ultimately pay off enough to offset the cost. The partial installments have generally gone to replacing or repairing existing barriers, not to building the new concrete or steel walls Mr. Trump wants.
At one point last year, the president and Democrats were close to a deal in which he would get all $ 25 billion for the wall in exchange for protections for 1.8 million young immigrants brought to the country illegally as children. But Mr. Trump ultimately turned away because he also wanted cuts to legal immigration that Democrats would not accept.
In his budget request for this year, Mr. Trump asked for $ 1.6 billion, and the Senate Appropriations Committee agreed on a bipartisan basis to give him that last summer. But the measure stalled until after the midterm elections in November.
By the time Mr. Trump met with Ms. Pelosi and Senator Chuck Schumer of New York, the Democratic leader, in December, they offered $ 1.375 billion. The president then insisted on $ 5.7 billion, and when he did not get it, much of the government was left without the funding to keep doors open.
During the shutdown, Ms. Pelosi took an even harder line, saying she would not spend a single dollar on Mr. Trump’s wall, although she said she would provide money for other border security.
The deal reached this week returned to the same $ 1.375 billion available in December to pay for 55 miles of fencing along the border, although not walls based on the new steel or concrete prototypes Mr. Trump has promoted.
Mr. Trump and his aides claimed victory because they had gotten more than Ms. Pelosi’s zero dollars, and they noted that the agreement also included $ 23 billion for Immigration and Customs Enforcement and Customs and Border Protection, an increase from $ 21 billion last year. But Democrats said much of the increase would go to their priorities, like more customs agents and humanitarian aid, not to Mr. Trump’s.
Either way, his aides are now focused on finding pots of money that, with the president’s traditional discretion, can be reprogrammed toward the wall. If that is not enough, he could still declare a national emergency to bypass Congress, although such a move is opposed by many Republicans and would invariably draw a court challenge.
As a result, some supporters of tougher border security said Mr. Trump’s critics should not crow because the struggle is not over.
“People say, ‘Well, the president lost,’” said James Jay Carafano, a national security analyst at the Heritage Foundation. “The analogy here is if it’s a 10-round fight, Trump’s fighting 10 rounds. If Pelosi wants to say at the end of Round 1, ‘I won that round,’ Trump’s like, ‘Yeah, maybe, but I’m fighting 10 rounds.’”
Andy Surabian, a former Trump White House aide, said the details do not matter to the president’s base as much as his determination to fulfill his promise. “His supporters don’t care about how the rest of the wall is built,” he said. “They just care that the wall is ultimately built.”