The Senate on Wednesday passed the so-called border surge proposal that would dedicate tens of billions of dollars to securing the United States-Mexico border by employing more agents, adding more high-tech surveillance equipment and finishing hundreds of miles in fencing.

The 69-29 vote propels the Senate closer to approving the comprehensive immigration reform bill by the end of the week.

The border surge amendment from Republican Sens. Bob Corker of Tennessee and John Hoeven of North Dakota, clears the path to the 60 votes needed to end a filibuster on the overall bill. It would double the number of border patrol agents along the southern boundary, pour $3 billion into new technology, and complete a 700-mile fence along the border.

Those provisions, along with several parochial and other sweeteners in the amendment, secured the votes from several wavering Republicans and solidified support among red-state Democrats who had stressed border security as a priority. And Democrats stayed on board because the Corker-Hoeven proposal did not alter the pathway to citizenship for millions of immigrants living illegally in the United States.

Before the border surge vote, senators approved, 68-30, a procedural vote waiving Senate budget rules for the immigration bill. And the Senate then voted 67-31 to cut off debate on the substitute amendment to the bill.

Senate Republicans and Democrats are still trying to secure an agreement to vote on more amendments to the immigration bill, which GOP senators say will be pivotal in picking up additional votes such as that of Sen. Rob Portman (R-Ohio). But they have yet to strike a deal.

Conservative opponents of the immigration bill remain unconvinced that the Corker-Hoeven plan would effectively seal the border. One, Sen. Jeff Sessions (R-Ala.), called the amendment a “legislative monstrosity” and blasted it for allowing undocumented immigrants to become legalized without more robust security measures already in place.

Corker and Hoeven’s proposal also had criticisms from its supporters, such as Sen. Susan Collins (R-Maine), who said the addition of nearly 20,000 border patrol agents was “wasteful” and said the House should reduce that number.

Earlier this week, the Senate voted 67-27 to advance the measure, winning the support of 15 Republicans.