Copyright NBC News

WASHINGTON — Senators struck an agreement Sunday, projecting confidence that it will be sufficient to end the lengthy U.S. government shutdown, three sources with direct knowledge of the details told NBC News. The agreement, reached by a group of Democrats who teamed up with Republicans, should have the necessary 60 votes to clear the Senate, these sources said. It would then need to pass the House and earn President Donald Trump's signature to become law and reopen the government. Even if it has enough support to clear those hurdles, the process is expected to take days. The agreement contains a “minibus” — three full-year appropriations bills that will fund certain departments like Agriculture through the end of the fiscal year next fall — and a continuing resolution to fund the rest of the government at existing spending levels through Jan. 30. It would also fully fund the Supplemental Nutrition Assistance Program, once known as food stamps, through next September, a major flashpoint in the shutdown. The sources said the deal also reverses Trump’s attempted layoffs of federal workers during the shutdown through RIFs, or “reduction in force” notifications. But in a major concession from Democrats, it does not include an extension of expiring Affordable Care Act subsidies. Allowing the funds to lapse would raise insurance premiums for millions of Americans unless they are extended. Instead, the Democrats settled for a promise that the Senate will vote on a bill to extend the subsidies by the end of the second week of December, with the outcome uncertain, two of the sources said. Even then, House Speaker Mike Johnson, R-La., has said he won’t promise that the House will vote on extending the subsidies. The deal to end the shutdown was negotiated by Sens. Jeanne Shaheen, D-N.H., Maggie Hassan, D-N.H., and Angus King, I-Vt., and gained approval from Senate Majority Leader John Thune, R-S.D., and the White House, according to the sources. At least eight Democrats will provide “yes” votes in addition to the 52 Republicans who have been voting for a stopgap funding bill, these sources said. It came a few days after Republicans emphatically rejected a proposal by Democrats to reopen the government alongside a one-year extension of the ACA funds. The Senate could start voting on the bill as early as Sunday night. Final passage through the Senate could be quick, but any one senator who opposes the deal could drag it out for days. If it passes, it would then head to the House, which has been on recess since September. And it is not clear that the deal has the support of House Democrats. The agreement drew mixed early reaction from Senate Democrats. Sen. Ruben Gallego, D-Ariz., said he’ll oppose the deal, as it fails to extend the ACA tax credits. “I have been clear on this from the beginning: I will not turn my back on the 24 million Americans who will see their premiums more than double if we don’t extend these tax credits,” he said. Sen. Tim Kaine, D-Va., said he will vote for it. “I have long said that to earn my vote, we need to be on a path toward fixing Republicans’ health care mess and to protect the federal workforce,” said Kaine. “This deal guarantees a vote to extend Affordable Care Act premium tax credits, which Republicans weren’t willing to do. Lawmakers know their constituents expect them to vote for it, and if they don’t, they could very well be replaced at the ballot box by someone who will.”