(Repeating to fix formatting in 2nd paragraph)
By Susan Cornwell and Richard Cowan
WASHINGTON, Jan 22 (Reuters) - U.S. senators struck a deal on Monday to lift a three-day government shutdown and try to end a fight between Democrats and President Donald Trump’s Republicans over immigration and border security.
Legislation to renew federal funding to the government cleared a procedural hurdle in the Senate and was expected soon to pass votes in the Senate and House of Representatives, allowing government to re-open through Feb 8.
Tens of thousands of federal workers had begun closing down operations for lack of funding on Monday, the first weekday since the shutdown, but essential services such as security and defense operations had continued.
Senate Democratic leader Chuck Schumer said he had come to an arrangement with Senate Majority Leader Mitch McConnell to keep the government open for the next few weeks after the Republican promised to let a bill on immigration reach the Senate floor.
The U.S. government cannot fully operate without funding bills that are voted in Congress regularly. Washington has been hampered by frequent threats of a shutdown in recent years as the two parties fight over spending, immigration and other issues. The last U.S. government shutdown was in 2013.
This shutdown, which began on the Friday’s first anniversary of Trump’s inauguration as president, undercut his self-crafted image as a dealmaker who would repair the broken culture in Washington.
It had forced Trump to cancel a planned weekend trip to his Mar-a-Lago estate in Florida and created uncertainty around his scheduled trip this week to the World Economic Forum in Davos, Switzerland.
In negotiations over the shutdown, Democrats had insisted that legislation to keep the government running include protections for young undocumented immigrants known as “Dreamers.”
Republicans in turn said they would not negotiate on immigration until Democrats gave them the votes needed to reopen the government.
Trump was expected to sign the legislation, which would give Congress more time to try to reach agreement on a long-term spending bill that would resolve issues including immigration, border security and spending caps.
McConnell promised to allow a fair and open immigration debate ”to consider a proposal that can actually be signed into law, a bipartisan, bicameral group is already negotiating and I look forward to completion of its work.”
Such a debate would occur if a deal on an immigration bill is not reached before Feb. 8, McConnell said
Democrats want Congress to address the issue of the Dreamers, more than 700,000 immigrants brought to the United States illegally as children.
Democratic Senator Heidi Heitkamp welcomed the deal.
“You now have a commitment for a path forward for the so-called ‘Dreamers.; That’s critical. We’re going to get a vote. We’re going to regular order,” she said.
House of Representatives Republicans have been told by their leaders to plan on voting on re-opening the government immediately.
Markets have absorbed the shutdown drama over the last week, and on Monday morning world stocks and U.S. bond markets largely shrugged off the standoff even as the dollar continued its pullback. U.S. stocks were higher, the dollar was slightly lower and benchmark treasuries yields were off highs of the day.
Both sides in Washington had tried to blame each other for the shutdown.
Democrats said Trump had not only failed to bring both sides together but made a deal more difficult by changing his position on what kind of agreement on immigration he would accept.
Trump and Republicans accused Democrats of putting the interests of illegal immigrants ahead of U.S. military personnel and government workers.
Early polls showed that Trump and Republican leaders were drawing most of the blame from American voters, but some Democrats worried they would pay a higher political cost if the shutdown dragged on.
Additional reporting David Morgan, Ginger Gibson, Amanda Becker, Blake Brittain, Susan Heavey, Diane Bartz, Megan Davies, Lucia Mutikani, Yasmeen Abdutaleb, Patricia Zengerle; Writing by Doina Chiacu; Editing by Alistair Bell