But McConnell urged the president to sit tight and make the Democrats come to them, this person said. Trump paused, agreed, and then offered McConnell his highest praise: "You are a good negotiator."
Republicans pursued a clear strategy to keep Trump contained during the three-day standoff that ended Monday — a president communicating a deliberate and simple message, while largely hidden from public view.
A photo released by the White House over the weekend showed Trump seated in the Oval Office behind a desk barren of papers, wearing a white "Make America Great Again" hat while appearing to talk on the phone. The staging epitomized Trump's role during the roughly 72-hour crisis: A president to be seen but not publicly heard outside the confines of his team's highly controlled communications operation.
The approach was particularly striking given the storms that led to the shutdown in the first place, which were exacerbated by the president's mixed signals and controversial statements on immigrants.
As Congress reached an agreement Monday afternoon, the first the public heard from the president was through a brief statement delivered by White House press secretary Sarah Huckabee Sanders during the daily media briefing.
"I am pleased that Democrats in Congress have come to their senses and are now willing to fund our great military, Border Patrol, first responders, and insurance for vulnerable children," Sanders read, quoting the president. "As I've always said, once the government is funded, my administration will work toward solving the problem of very unfair, illegal immigration. We will make a long-term deal on immigration if, and only if, it's good for our country."
Whether the White House can secure an immigration deal — and stave off a longer shutdown — remains unclear. Trump huddled with hard-line Republicans and moderate Democrats at the White House on Monday but offered few specifics on what he wanted. He remains flexible on policy and an unreliable negotiator, and several aides said privately the next test would be harder than this one.
"Clearly, we don't want a shutdown," Mick Mulvaney, head of the Office of Management and Budget, said in an interview. "But do I think it's going to be easy to arrive at an immigration result over the next couple weeks? No."
The West Wing's strategy began before the partial shutdown when Marc Short, Trump's director of legislative affairs, delivered a message to staffers in a Friday morning meeting, according to a White House official. "This is not going to be won legislatively, it's going to be won through a communications effort," Short told the assembled group, the official said.
One key challenge, however, was keeping Trump on script, administration officials and senior legislative aides said. Trump was concerned that he would face blame for a shutdown and repeatedly asked aides to ensure the damage was limited, citing criticism that President Barack Obama received in 2013, these people said.
In a 20-minute phone call late Friday night, Mulvaney said the president wanted to make sure the shutdown didn't hurt as badly as the one in 2013 did.
Mulvaney explained to the president how the government closed and how agencies could transfer funds to stay open, he said. Even until the late hours of Friday, "the president wanted to keep the government open," Mulvaney said.
Trump was tempted by Schumer's offer to provide wall funding and increase defense spending while creating a legislative solution for young undocumented immigrants, administration and legislative aides said. But White House Chief of Staff John F. Kelly later called, with Trump on the line, and outlined concerns that Trump had not previously raised, aides said.
The president's mind-set shifted at midnight, Mulvaney said.
"Once they pulled the trigger on shutting the government down, that changed the dynamic," Mulvaney said. "There were no more talks. There were no more negotiations to be done. He felt it was a legislative issue."
Mulvaney said Trump was so concerned about things remaining open during the shutdown that a staffer went to the Mall when a photo accompanying a news story appeared to show a memorial closed. The office later learned the photo was a stock photo taken in 2013, he said.
Over the weekend, aides like Mulvaney, Kelly and Short warned Trump to stay out of the fight and let it play out on Capitol Hill.
McConnell and House Speaker Paul D. Ryan (R-Wis.) also believed that the Democrats were in a politically tricky position, and called Trump multiple times to ensure he remained locked into the approach, Republicans familiar with the discussions said.
Trump told advisers on several occasions he was listening — even if his instincts were to do otherwise.
The approach was simple and streamlined, a White House official said: Blame Democrats for the stalemate by branding it the "Schumer Shutdown"; argue that the Democrats were holding the government and military hostage by trying to link the unrelated policy issue of immigration to a funding bill; and make it clear that the White House would not negotiate on anything while the government remained closed.
The White House also made sure that senior administration officials, as well as top surrogates, were out on television pushing the president's message. The strategy helped magnify the White House pitch and ensure that Trump, who spent large portions of the weekend following the shutdown on cable news, would not see negative coverage that made him more inclined to strike a deal with Democrats, White House officials said.
"One of the things that helped us over the last three days was being as coordinated as we were on our messaging from the White House, the House and the Senate," Short said in an interview Monday. "Look at the messaging the president did with his tweets — they were very consistent with the Republican Senate messaging, too. The Democrats had locked themselves into a corner without a way out, and as long as we were united in that message, we were going to be fine."
"I think we're in a good position," Trump said, according to two White House officials. "Let's hold the line."
Frank Sharry, the executive director of America's Voice, a pro-immigration group, said the Democratic strategy — to have Schumer coax Trump into a bipartisan deal, which the president would then sell to reluctant congressional Republicans — failed when Trump receded from public view and negotiations. Schumer tried to lure Trump back to the table with public comments but failed, aides said.
"The opponents of the solution tied the president to the furniture over the weekend," Sharry said. "When the Democrats blinked, it was certainly a setback."
When Trump visited Sanders's office Saturday to check in on the shutdown and praise his team on the one-year anniversary of his presidency, he thanked Mulvaney and Short by name and offered a confident assessment of the situation.
Michael Scherer and Erica Werner contributed to this report.