Update 8pm: The US Congress is speeding towards reopening the government as Senate Democrats dropped their objections to a temporary funding bill.
Democrats' objections were dropped in return for assurances from Republican leaders that they will soon address immigration and other contentious issues.
Senate Republican leader Mitch McConnell's commitment to quickly tackle the issue of immigrant "Dreamers" was contingent on Democrats providing enough votes for a stopgap spending measure lasting a little less than three weeks.
The measure needed 60 votes, and Democrats provided 33 of the 81 it got. Eighteen senators, including members of both parties, were opposed.
Before the government can reopen the Senate must vote on final passage, the House must approve in turn, and President Donald Trump must sign the measure.
Democrats climbed on board after two days of negotiations that ended with new reassurances from Mr McConnell that the Senate would consider immigration proposals in the coming weeks.
Senate Democratic leader Chuck Schumer lent his backing to the agreement during a speech on the chamber's floor.
"Now there is a real pathway to get a bill on the floor and through the Senate," he said of legislation to halt any deportation efforts aimed at "Dreamers", who were brought to the country as children and are now here illegally.
Soon, the govt will reopen, and we have a lot to do:
• Write a budget
• Address health care, veterans, disaster relief, pensions & the opioid epidemic.
The #TrumpShutdown will soon end, but the work goes on.— Chuck Schumer (@SenSchumer) January 22, 2018
The White House downplayed Mr McConnell's commitment, and said Democrats caved under pressure. "They blinked," principal deputy press secretary Raj Shah told CNN.
Earlier on Monday, Mr McConnell raised hopes for a quick end to the shutdown, saying "I hope and intend" to reach agreement soon on immigration and other contentious issues - if the Democrats agreed to the stopgap spending measure.
A block of liberal Democrats - some of them 2020 presidential hopefuls - stuck to their opposition. Senators Elizabeth Warren of Massachusetts, Dianne Feinstein of California, Kirsten Gillibrand of New York and Cory Booker of New Jersey voted no, as did Independent Bernie Sanders of Vermont.
Ms Feinstein said she was not persuaded by Mr McConnell's assurances and did not know how a proposal to protect the more than 700,000 younger immigrants would fare in the House.
House Speaker Paul Ryan told Fox News on Monday that if the Senate approved a temporary spending bill to reopen the government until February 8, the House would approve it, too.
The Senate vote came as most government offices cut back drastically or even closed on Monday, as the major effects of the shutdown were first being felt with the beginning of the working week.
Mr McConnell said he hoped to reach bipartisan solutions on immigration, border security, disaster aid, military funding and more by February 8. If not, he said "it would be my intention to take up legislation" addressing those issues.
Earlier: Republicans and Democrats reach temporary budget deal to end US government shutdown
US senate leaders have reached an agreement to reopen the government.
The upper house in Congress vowed to advance a bill financing government which will bring to an end a federal shutdown.
The senate vote was 81-18, well above the 60 votes needed but the senate still must vote on final passage to send the bill to the House.
Democrats ended their delaying tactics against a bill financing federal agencies through February 8.
Senate minority leader Chuck Schumer said, in exchange, majority leader Mitch McConnell has agreed to begin debating immigration by that date.
Mr McConnell says the end to the standoff shows "the American people didn't understand" why Democrats shut down the government because they wanted to help "illegal immigrants."
The Senate has started a vote to advance the bill reopening government. It is expected to pass easily, and House approval is expected later.
- Digital Desk