The U.S. Senate reached agreement on a deal that would end the government shutdown that began at midnight on Friday, allowing thousands of furloughed federal workers to return to work and others to expect their next paychecks to arrive on time. 

The Senate voted 81-18 to temporarily end a standoff between Democrats and Republicans over immigration policy. Before the government can reopen, the House must approve the measure that the Senate passed.

Democrats in the Senate agreed to pass a short-term spending package that would fund the government through February 8 in exchange for a promise from Republicans leaders to address the future of undocumented immigrants known as Dreamers. Disagreements over how to deal with issues such as immigration and children's health insurance had derailed the funding process in recent weeks.

The last time the government shut down, for 16 days during President Barack Obama's administration in 2013, the government lost about $25 billion in revenue, according to Standard & Poor's. Today, the first day markets have been open since the shutdown, the Standard & Poor's 500 Index rose 0.4% and the Dow Jones Industrial Average gained 0.2%.

Senate Democrats were said to have accepted a deal to end the government shutdown in exchange for the promise of a vote on the DREAM Act in the coming weeks. That act covers the immigration status of thousands of people who entered the country illegally while they were still children.

More of What's Trending on TheStreet:

More from Politics

Judge Orders Trump Administration to Restore Acosta's Press Pass

Judge Orders Trump Administration to Restore Acosta's Press Pass

Federal Reserve Will Review How Well It Makes Policy and Communicates

Federal Reserve Will Review How Well It Makes Policy and Communicates

Bernie Sanders to Unveil 'Stop Walmart Act,' Wants Retailer to Boost Wages

Bernie Sanders to Unveil 'Stop Walmart Act,' Wants Retailer to Boost Wages

Market Movers: Brexit Update

Market Movers: Brexit Update

Economist Perspective: Why 2019 Will Be Different?

Economist Perspective: Why 2019 Will Be Different?