"If we do not get a fair deal from Congress, the government will either shut down on February 15 again".
"All of us believe that if we had three weeks with the government open, with all the discord coming from a shutdown, that we could find a way forward to produce a bill that he would sign", Graham said on the Senate floor.
A three-week stopgap spending plan, passed by the Senate and heading to the House of Representatives, now sets up tough talks with lawmakers about how to address security along the U.S.
After saying for weeks that he would not reopen the government without border wall money, Trump said he would soon sign a bill to re-open the government through February 15 without additional money for his signature campaign promise. But they will at least not have to worry about how to feed their families for three weeks, or, hopefully, ever again, if USA lawmakers can agree on a long-term funding bill by February 15, 2019.
"The president thought he could crack Democrats and he didn't and I hope it's a lesson for him", said the Senate Democratic leader, Chuck Schumer.
"We really have no choice but to build a powerful wall or steel barrier", he said.
The deal includes back pay for about 800,000 federal workers who have gone without paychecks.
It is also unclear if House Speaker Nancy Pelosi will re-invite Trump to deliver the state of the union address in the House chamber on January 29.
Trump's deal with Democrats does not include funding for any type of barrier along the southern border. The shutdown had also threatened important government functions, impeding Food and Drug Administration safety inspections and the ability of the Internal Revenue Service to process tax refunds, and - in a final sign that it could continue no longer - causing delays Friday at major East Coast airports as unpaid air traffic controllers failed to report to work.
The shutdown began on 22 December over the president's insistence that Congress allocate $5.7bn to erect a wall along the United States border with Mexico.
Trump to deliver state of union address after gov't shutdown ends
They were left considering possible alternatives before Trump scuttled the idea in his Wednesday night tweet . The government has been closed for 34 days but neither side appears close to reaching an agreement.
John Kelly, who served as Trump's chief of staff and Homeland Security secretary, and four other former Homeland Security secretaries called the shutdown "unconscionable" in a letter to Trump and Congress, warning that some of the department's 240,000 employees may be forced to quit and look for work elsewhere if they do not get paid. For weeks, he'd let Trump and Democrats try reaching an accord and, until Thursday, had barred any votes on legislation Trump would not sign.
The breakthrough came as LaGuardia Airport in NY and Newark Liberty International Airport in New Jersey both experienced at least 90-minute delays in takeoffs Friday because of the shutdown.
Analysis by its editor-at-large says "Nancy Pelosi broke Donald Trump" by just saying "no" and sticking to it.
"I want to thank all of the incredible federal workers and their awesome families who have shown such extraordinary devotion in the face of this recent hardship", he said. They used federal workers as pawns.
His original assertion that Mexico would pay for the wall seems to have been all but forgotten as he tried to convince his Democratic opponents to sign off the billions of U.S. taxpayer dollars he demanded.
Republican Senator Lindsey Graham said he had spoken to Trump about a three-week funding bill.
Federal workers will be compensated when the government reopens.
Trump said in the meantime a bipartisan committee of lawmakers would meet to discuss the nation's border security needs.
Of the shutdown's effects on his agency, he said: "It's mind-boggling, it's short-sighted, and it's unfair".
It included Mr Trump's tweets appealing for understanding, but also featured stinging criticism from conservative commentator Ann Coulter.