US border security deal reached to avert new shutdown
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.
Lawmakers expressed optimism that a bill would 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).
What is known about the deal?
The deal was struck in a closed-door meeting in Washington on Monday evening after several hours of talks.
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.
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.
By Monday night, some of the president's conservative allies had already denounced the deal, with Fox News commentator Sean Hannity calling it a "garbage compromise".
What did Trump say?
In a crowded stadium with banners saying "Finish the Wall" in El Paso, in Texas, Mr Trump told supporters: "Walls work… Walls save lives."
He repeated that a border fence in the city, opposite Ciudad Juárez in Mexico, "made a big difference", even though critics reject his claim as exaggerated and based on misleading data.
"We need the wall, and it has to be built," said Mr Trump, who has previously threatened to declare a national emergency and fund the wall without Congress.
The idea, however, is disliked even by some fellow Republicans, and Democrats are likely to challenge it in the courts.
As the president spoke, Beto O'Rourke, a former Democratic congressman and potential presidential candidate in 2020, held counter-rally, accusing Mr Trump of stoking false fear about immigrants with "lies".
- Trump's wall: How tech fills the gaps
- Trump's border wall in seven charts
- Is there a crisis on the US-Mexico border?
Why is there the risk of another shutdown?
On 25 January, President Trump agreed to a three-week spending deal to end the shutdown and allow Congress to reach an agreement.
The shutdown was triggered by the Democrats' refusal to approve funds for his promised wall on the border with Mexico.
During the last shutdown, hundreds of thousands of workers were furloughed (put on unpaid leave) in December and January while others in essential services, such as hospital care, air traffic control and law enforcement, worked without pay.
The president has backed away from calls to make Mexico pay for a concrete wall, but during his State of the Union speech last Tuesday – delayed because of the previous shutdown – he insisted on a "smart, strategic, see-through steel barrier".