The US Senate has overwhelmingly endorsed the building of a fence along part of the border with Mexico, in an effort to curb illegal immigration.
Immigration is a key issue in the run-up to the mid-terms elections
The bill was approved by a vote of 80-19 - with leading Democrats such as Hillary Clinton joining the Republican majority that had proposed the measure.
The bill must be reconciled with a similar move passed in the House of Representatives last week.
Mexico has said the fence will badly affect relations with the US.
Supporters of the 700-mile fence (1,125km) fence said it was a crucial tool to fight illegal immigration - which is expected to be a key issue in November's mid-term elections.
An estimated 1.2m illegal immigrants were arrested last year trying to cross into the US along the border states of Texas, New Mexico, Arizona and California.
Sections of the fence would be built in each state. One segment is already under construction in California.
When completed the fence will cover one-third of the length of the US-Mexican border.
Mexico has repeatedly condemned the plan.
On Friday Foreign Minister Luis Ernesto Derbez called it a "gesture that doesn't reflect the friendship between the nations of Latin America and the Caribbean and the United States".
He added that Mexican migrants were "not terrorists" - but people looking for work opportunities.
Earlier this year the Senate passed broad immigration legislation combining border security with a plan to create a guest-worker program for illegal immigrants living in the US.
The Senate and House were unable to reach agreement and instead resorted to passing a series narrow border security measures.