The technology industry “understands there’s probably not a tremendous amount of resistance to their part of the bill,” Mr. Rubio said in an interview last week, saying he welcomed the industry support. “But their future and getting the reform passed is tied to the overall bill.”

The bill has a good chance of winning passage in the Senate. The hardest sell will come in the House, where many conservative Republicans see the deal as too generous to immigrants who came to this nation illegally.

Rob Jesmer, a former top Republican Senate strategist who helps run the new Zuckerberg-backed nonprofit group that sponsored the Rubio ad, insisted that his organization’s push is based on the personal convictions of the executives who donated to the cause and who believe immigration laws need to be changed. Those convictions just happen to line up with what their corporations are lobbying for as well, he said.

“It will give a lot of people who are educated in this country who are already here a chance to remain in the United States,” Mr. Jesmer said, “and encourage entrepreneurs from all over the world to come to the United States and create jobs.”

The profound transition under way inside Silicon Valley companies is illustrated by their lobbying disclosure reports filed in Congress. Facebook’s lobbying budget swelled from $351,000 in 2010 to $2.45 million in the first three months of this year, while Google spent a record $18 million last year.

That boom in spending translates into hiring of top talent in the art of Washington deal-making. These companies have hired people like Joel D. Kaplan, a onetime deputy chief of staff in the Bush administration who now works for Facebook; Susan Molinari, a former House Republican from New York who is now a Google lobbyist; and outside lobbyists like Steven Elmendorf, a former chief of staff to Richard A. Gephardt, a former House majority leader, who works for Facebook.

The immigration fight, which has unified technology companies perhaps more than any other issue, has brought the lobbying effort to new heights. The industry sees it as a fix to a stubborn problem: job vacancies, particularly for engineers.