WASHINGTON — President Donald Trump signed a Congress-approved spending measure Monday night, signaling the end of a three-day federal government shutdown but leaving unresolved the issue at the heart of the impasse — shielding thousands of immigrant youth from deportation.

The measure, which funds the government through Feb. 8, cleared the Senate in an 81-18 vote Monday afternoon, and later passed the House of Representatives in a 266-150 vote.

White House Press Secretary Sarah Huckabee Sanders said the Trump administration expected federal offices and operations to “start back in full capacity” Tuesday morning.

The Senate vote — which came on the third day of the government shutdown — followed days of heated negotiations over the spending proposal stoked by Senate Democrats’ efforts to address restoring the soon-to-expire Deferred Action for Childhood Arrivals program, known as a DACA. The Obama-era program protects thousands of young immigrants from deportation.

Senate Democrats had been pushing GOP lawmakers to restore the DACA program as part of a short-term spending bill, but after days of deadlocked negotiations, Democrats conceded to Senate Majority Leader Mitch McConnell’s three-week funding proposal.

McConnell’s measure did not address DACA, but the Kentucky Republican offered lawmakers assurances that the chamber would soon take up legislation to protect the program before it expires in March.

“When I proceed to the immigration debate, it will have an amendment process that is fair to all sides,” McConnell said in a Senate floor speech Monday morning. “I would hope there would be cooperation on these matters in advance of yet another funding deadline.”

Get the Breaking News newsletter!

Senate Minority Leader Chuck Schumer (D-N.Y.), in his Senate floor speech, acknowledged the vote “will not satisfy everyone on both sides,” but he called it “a way forward” on DACA negotiations.

“We will vote today to reopen the government to continue negotiating a global agreement, with the commitment that, if an agreement isn’t reached by February the 8th, the Senate will immediately proceed to the consideration of legislation dealing with DACA immediately,” Schumer said.

Democrats had been reluctant to sign onto a budget agreement that did not include DACA, questioning whether the GOP-controlled House would take up the issue independent of the spending measure.

House Speaker Paul Ryan, in a Monday morning interview on “Fox and Friends,” said the House would go back to the negotiating table on DACA if Senate Democrats backed the temporary spending measure.

“What we’re saying is, ‘open the government and then we’ll get back to the negotiations that were already underway that they blew up when they shut the government down,’ ” Ryan said.

Several prominent Democrats, liberal groups and immigration rights organizations criticized Schumer for agreeing to a vote Monday that did not guarantee the passage of a DACA extension.

Sen. Kirsten Gillibrand (D-N.Y.), who was among the 18 dissenting votes, said on Twitter: “I am deeply disappointed that today’s outcome fails to protect Dreamers. They deserve better from the elected leaders of the only country many of them have ever called home.”

Rep. Luis Gutierrez (D-Ill.), a vocal supporter of the 800,000 youth known as “Dreamers” that are covered under DACA, criticized the Senate agreement, saying he would not back a bill that “kicks the can down the road.”

“I do not see how a vague promise from the Senate Majority Leader about a vague policy to be voted on in the future helps the Dreamers or maximizes leverage the Democrats and American people have over the Republicans right now,” Gutierrez said.

Frank Sharry, executive director of America’s Voice, a national immigration advocacy group, echoing criticisms made by other liberal groups said “last week, I was moved to tears of joy when Democrats stood up and fought for progressive values and for Dreamers. Today, I am moved to tears of disappointment and anger that Democrats blinked.”

Trump, who was largely absent from the weekend negotiations on Capitol Hill, said in a statement Monday he was “pleased that Democrats in Congress have come to their senses.”

“As I have always said, once the Government is funded, my Administration will work toward solving the problem of very unfair illegal immigration,” Trump said. “We will make a long-term deal on immigration if, and only if, it is good for our country.”

Schumer had faulted Trump for the stalemate, noting Monday that the president twice rescinded a compromise deal he agreed to on Friday.