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

Shanghai Composite Index's Technical Patterns Aren't Uplifting

Shanghai Composite Index's Technical Patterns Aren't Uplifting

Markets Bounce on Long-Anticipated Tariff News

Markets Bounce on Long-Anticipated Tariff News

David Axelrod: How The Election Map Will Play A Role in Midterms

David Axelrod: How The Election Map Will Play A Role in Midterms

Jim Cramer: The Chinese Have More to Lose in This Trade War

Jim Cramer: The Chinese Have More to Lose in This Trade War

Trump Announces Escalating Tariffs on China

Trump Announces Escalating Tariffs on China