And I'm Robert Siegel. We begin this hour with what appears to be a major breakthrough in the Senate on immigration. The legislation has been stalled, as some senators complained that it did not do enough to secure the border with Mexico. Well, today, a compromise has been struck. It would nearly double the number of border patrol agents at the Mexican border.

The deal was sponsored by two GOP senators and as NPR's David Welna reports, it will increase support for the bill among Senate Republicans.

DAVID WELNA, BYLINE: It became clear earlier this week that unless more border security measures were added to the sweeping immigration overhaul, backers of the bill could fall far short of the 70 senators they hoped would support it and thus, increase pressure on the GOP-led House to pass it. So two Republican senators who wanted to see the bill pass cobbled together an amendment they hope would get their GOP colleagues on board.

One was John Hoeven of North Dakota, who presented the deal on the Senate floor.

SENATOR JOHN HOEVEN: We're not done. We must do more to secure the border in this legislation. And that's exactly what we're offering here today. It is a very straightforward way to secure our border and to do so before allowing a pathway to legal permanent residency for those who came here illegally.

WELNA: Using revenues from the immigration bill that the Congressional Budget Office estimates could be close to a trillion dollars over the next two decades, the amendment would add 20,000 border patrol agents to the 21,000 already deployed along the Mexican border. It would also complete 700 miles of fencing. Tennessee Republican Bob Corker is cosponsoring the amendment.

SENATOR BOB CORKER: Some people have described this as a border surge. And the fact is that we are investing resources in securing our borders that have never been invested before, a doubling, again, of the border control, $3.2 billion worth of technology that we took from the chief of the border control, the technology that he needs to have 100 percent awareness and to secure our border.

WELNA: All four Democrats and four Republicans in the gang of eight have lined up behind the measure, even though some Democrats doubt more border patrol agents are needed. Gang of eight member and New York Democrat Charles Schumer called the amendment a real breakthrough.

SENATOR CHARLES SCHUMER: Anyone who believes that we must strengthen border security has to be very favorably disposed to this amendment. And it solved the riddle of how we deal with border security in a way without allowing somebody in future years who is against citizenship to impede that path.

WELNA: And a Republican in the gang of eight, Arizona's John McCain, readily acknowledged the measure was all about winning more votes for the bill.

SENATOR JOHN MCCAIN: We know that we need a very large number of Republicans and a very large vote, okay? We were not getting that, okay? And so we asked Senator Corker and Senator Hoeven to look at these issues and see if they could come up with a way that we could get more support and yet, not lose Democrats. And I think they've done a great job.

SENATOR MARK KIRK: With the border security amendment, I will be able to support the bill.

WELNA: As many as a dozen more Republicans are now on board with the bill, according to gang of eight Republican Jeff Flake of Arizona.

SENATOR JEFF FLAKE: Our goal has been 70 votes and this brings us close to 70. I don't know if we'll get all the way there, but it will be close to 70.

WELNA: But the bill's opponents scoffed at the promises to strengthen the southern border. Ted Cruz is a Republican from Texas.

SENATOR TED CRUZ: What I think the American people want is real border security, not an empty fig leaf. And they want border security first, before legalization. If the legalization happens first, the border security never will.

WELNA: The bill's backers hope to pass it by the end of next week. That would shift the focus on getting an immigration bill to the House. David Welna, NPR News, the Capitol. Transcript provided by NPR, Copyright NPR.