Democrats and Republicans have reached an agreement in principle over border security to fund the US government and avert another partial shutdown.
The agreement contains only a fraction of the money President Donald Trump wants for his promised border wall and does not mention a concrete barrier.
The deal still needs to be approved by Congress and signed by the president.
Speaking later, Mr Trump did not say whether he would back it. “We’re building the wall anyway.”
The Democrats – who now control the House of Representatives – have refused to approve the $5.7bn (£4.4bn) for Mr Trump’s border wall, one of his key campaign pledges.
A bill must be approved by Friday when funding runs out for some federal agencies.
The previous shutdown – the longest in US history – lasted 35 days and cost the country’s economy an estimated $11bn (£8.5bn).
The deal was struck in a closed-door meeting in Washington on Monday evening after several hours of talks, according to lawmakers.
It includes $1.375bn in funding for 55 miles (88km) of physical barriers, including “steel bollard” fencing, a small part of the more than 200 miles promised by the president, reports say.
Republican Senator Richard Shelby said all outstanding issues had been resolved.
“We got an agreement on all of it,” he said. “Our staffs are going to be working feverishly to put all the particulars together. We believe that if this becomes law, it’ll keep open the government.”
Earlier, the talks had reached an impasse with Democrats demanding a limit to the number of undocumented migrants already in the US who could be detained by Immigration and Customs Enforcement (ICE).
Democrats gave up on that demand and instead it was agreed to reduce the number of beds in detention centres to 40,250 from the current 49,057, reports say.
Addressing supporters in the border city of El Paso, in Texas, Mr Trump said he had had no time to study the agreement, but stressed that he would “never sign a bill that forces the mass release of violent criminals”.