The breakthrough came when the Congressional Budget Office released a report Tuesday finding that the bill would cut billions of dollars from the deficit.
Sen. Lindsey Graham, R-S.C., an author of the bill who helped run interference between Corker and Hoeven and Democrats in the group, said that with the CBO finding in hand, he sat down with Schumer and Corker and said, "OK, let's go big."
The idea immediately appealed to the left and the right.
For Republicans, it provided concrete assurances that the bill would achieve a secure border. For Democrats, it offered goals that, if dramatic, were achievable and measurable.
Still, not everyone was won over.
Shortly before Corker and Hoeven went to the Senate floor to announce their agreement Thursday afternoon, five leading Republican opponents of the bill held a news conference to denounce the deal as little more than an empty promise.
"In short I think this amendment is designed to pass the bill but not to fix the bill," Sen. David Vitter, R-La., said.
About 10 Republicans have indicated they will vote for the bill, far more than enough to ensure it will have the 60 votes required to overcome any attempted filibuster by last-ditch opponents. Democrats control 54 seats, and party aides have said they do not expect any defections.
In addition to the border security components and eventual citizenship for the 11 million people now here illegally, the immigration bill would create new work visa programs and expand existing ones to allow tens of thousands of workers into the country to work in high- and low-skilled jobs.
Employers would have to verify their workers' legal status.