Top Democrat senator Chuck Schumer said they had come to an agreement with the Republicans

The US Senate on Monday reached a deal to reopen the federal government, with Democrats accepting a compromise spending bill to end days of partisan bickering that forced hundreds of thousands of government employees to stay home without pay.The impasse, the first of its kind since 2013, cast a huge shadow over the first anniversary on Saturday of President Donald Trump's inauguration.The Senate was poised to pass the compromise, but the shutdown will only end formally once the House of Representatives approves the measure keeping the government funded until February 8 -- which it is expected to do.As the Senate convened for the day, the chamber's top Democrat Chuck Schumer announced that members of his party would vote with ruling Republicans to end the shutdown on day three, after a weekend of frustrating talks on Capitol Hill."After several discussions, offers, counteroffers, the Republican leader and I have come to an arrangement," Schumer said on the Senate floor, referring to Majority Leader Mitch McConnell."We will vote today to reopen the government."But he warned McConnell that he expected Republicans to make good on a pledge to address Democrat concerns over the Deferred Action on Child Arrivals (DACA) program that shields immigrants brought to the country as children from deportation, but expires on March 5.There are an estimated 700,000 "Dreamers" whose fates are up in the air."If he does not, of course, and I expect he will, he will have breached the trust of not only the Democratic senators but members of his own party as well," Schumer said.Hopes that the shutdown, which began at midnight Friday, could be limited to the weekend were raised when a bipartisan group huddled for hours on Sunday trying to end the standoff, but they ultimately failed to reach a deal.Then as Monday began, Trump goaded Democrats from the sidelines, accusing them of shutting down the government to win concessions on immigration, in service of "their far left base.""They don't want to do it but are powerless," he tweeted, referring to Schumer and other Democratic leaders.But Schumer said on the Senate floor it was time to get back to work, and lashed out at Trump."The great deal-making president sat on the sidelines," he said.The bill needed 60 votes to advance in the 100-member Senate, meaning Republicans -- who have a one-seat majority -- could not maneuver on their own.Over the weekend, Trump encouraged the Senate's Republican leaders to invoke the "nuclear option" -- a procedural maneuver to change the chamber's rules to allow passage of a budget by a simple majority of 51 votes to end the shutdown.But Senate leaders have been wary of such a move in the past, as it could come back to haunt them the next time Democrats hold a majority.There have been four government shutdowns since 1990. In the last one, more than 800,000 government workers were put on temporary leave.

Essential federal services and military activity are continuing, but even active-duty troops will not be paid until a deal is formally sealed.