The US Senate has reconvened during its August recess to pass a $600m (£385m) Mexico border security measure.
The funds will mostly be directed to activities on the south-west border, such as hiring 1,000 border patrol agents and 250 immigration and customs enforcement agents.
It will also provide for new surveillance technology including unmanned drones.
A White House official said President Obama would sign the bill on Friday.
"This new law will also strengthen our partnership with Mexico in targeting the gangs and criminal organizations that operate on both sides of our shared border," Mr Obama said in a statement.
Republicans and Democrats agreed to pass the bill by a "voice vote", requiring only two senators to be present. Senator Ben Cardin, Democrat of Maryland, presided while Senator Chuck Schumer, Democrat of New York, voted in the 40-minute session.
Mr Schumer, the measure's chief sponsor, hopes it will pave the way for comprehensive immigration legislation to be considered after the August recess.
"Both moderate Democrats and Republicans said they wouldn't even consider comprehensive reform until we did something about the border," Mr Schumer said.
Some Republicans appear unsatisfied though, with Senator Jeff Sessions calling the bill "a small measure" which "if it is not followed by strong, sustained action, it is yet another gesture without consequence."
The $600m will be paid for by raising fees on some foreign work visas.
This is only the second time in four decades that the Senate has been called back into session during August. The other time was to pass emergency measures related to Hurricane Katrina in 2005.