As congressional Republicans celebrated the looming passage of a short-term spending bill that would reopen the government, White House officials began to take a victory lap on the conclusion of a shutdown they had worked to pin entirely on Senate Democrats’ shoulders.

President Trump spent the weekend using his Twitter account to hammer Senate Democrats over their refusal on Friday to vote for a continuing resolution that would have averted the three-day partial government shutdown. But the president seemed to leave much of the heavy lifting that led to an agreement on Monday to congressional leaders and his representatives on Capitol Hill, paving the way for an immigration deal that could ultimately fall short of what Trump has requested.

White House spokesman Raj Shah said Trump did remain in touch with GOP lawmakers during the shutdown, despite Senate Minority Leader Chuck Schumer’s claim on Monday that Trump had “sat on the sidelines” of congressional negotiations after the government ran out of funding on Friday.

“The president was certainly involved, he was engaged in the process, talking to Republican leaders,” Shah said during an interview on CNN.

White House press secretary Sarah Sanders argued the spending deal to which Schumer agreed — a three-week continuing resolution that did not include protections for young, undocumented, immigrants — was no more favorable to Democrats than the legislation they defeated on Friday.

“I don’t see it to be drastically different,” Sanders said of the bill. “We were pleased to see Sen. Schumer accept the deal that President Trump put on the table from the beginning.”

Sanders dismissed the criticism from Schumer that Trump deserved no credit for ending the shutdown because he hadn’t participated in talks since a tentative agreement between the Senate minority leader and the president fell apart Friday afternoon.

“What the president did clearly worked,” Sanders said. “The vote just came in 81 to 18. I would say those numbers are much more in the president's favor than Schumer’s favor.”

Trump had worked during the shutdown most closely with legislative director Marc Short, budget director Mick Mulvaney, chief of staff John Kelly, and some of his Cabinet secretaries, Sanders said earlier Monday. His primary focus over the weekend, she said, was on managing the effects of the partial shutdown on his administration.

White House officials had said the administration would strive to make the shutdown as painless as possible when the timeline of its end still looked uncertain, arguing the Obama administration had made the most recent shutdown in 2013 more impactful than was necessary.

"He's taking the absolute opposite approach that you saw from the previous administration, where they frankly tried to weaponize the shutdown," Sanders told reporters at the White House earlier Monday, before the Senate struck its deal. "They put out signs, they closed memorials, they did things that were totally unnecessary for the purpose of trying to score political points."

A White House official told the Washington Examiner that some of the ways the administration had worked to mitigate the shutdown included using “funding flexibilities” to continue negotiations over NAFTA, while the previous administration had canceled a round of multilateral trade negotiations during the 2013 shutdown; furloughing 30 percent fewer mine safety inspectors at the Labor Department; encouraging the Environmental Protection Agency to use unobligated balances to remain open even though the EPA largely shuttered during the last shutdown; and keeping open the Merchant Marine Academy, which closed in 2013.

The official said the administration had pushed federal agencies to use whatever funding flexibility they could find to keep the government operating during the shutdown.

“We are working to use carryover funds, when the law permits, to minimize the impact on the public and federal workers,” the official said.

Sanders noted shortly after the Senate passed the spending bill that although Trump had made “several different calls” to lawmakers ahead of the vote, his “big priority” was preventing the shutdown from disrupting government operations.

White House aides reportedly encouraged Trump over the weekend to give congressional leaders space to iron out a deal that would restore government funding within the framework he had already articulated.

Most Senate Democrats agreed to vote for a continuing resolution that will keep the government running through Feb. 8 and fund the Children’s Health Insurance Program for six years after McConnell offered his assurance that the Senate would take up legislation to grant legal status to undocumented immigrants shielded from deportation by the Deferred Action for Childhood Arrivals program, which will the Trump administration has set to end in early March. Previously, Democrats had fought to include DACA protections in the stopgap spending bill, an approach congressional Republicans and the White House rejected.

GOP lawmakers have pushed to couple DACA protections with other immigration reforms, including changes to the diversity visa lottery program, limits on so-called chain migration, and funding for increased border security. Trump has said he would not sign an immigration bill that excludes funding for his promised wall along the Southwest border.

The White House and Republicans appeared to get their wish on Monday when Democrats voted on an immigration-free spending bill, thus limiting the minority’s chances of securing DACA protections without having to make other concessions.

Administration officials were quick to tout what they perceived as a victory in the immigration battle.

Trump claimed Democrats “have come to their senses” by agreeing to separate immigration reform from spending legislation, and he vowed to sign a long-term immigration deal “if and only if it is good for the country.”

Vice President Mike Pence, who avoided much of the shutdown drama while on a previously scheduled trip to the Middle East, stepped out of a dinner with Israeli Prime Minister Benjamin Netanyahu on Monday to address the passage of a short-term spending deal.

“The prime minister has granted me leave to address some news on the home front back in the United States,” Pence said. “And let me say we welcome the news that, thanks to the firm stand taken by the president and House and Senate Republicans, the government shutdown in Washington, D.C. is coming to an end.”

The House is expected to take up the Senate-passed spending bill late Monday afternoon.