WASHINGTON (AP) - White House-backed immigration legislation is gaining momentum in the Senate, where key lawmakers say they are closing in on a bipartisan compromise to spend tens of billions of dollars stiffening the bill's border security requirements without delaying legalization for millions living in the country unlawfully. This is a key moment in the effort to pass this bill. This is sort of the defining 24 to 36 hours," Sen. Lindsey Graham, R-S.C., said Wednesday night after a day of private talks. Under the emerging compromise, the government would grant legal status to immigrants living in the United States unlawfully at the same time the additional security was being put into place. Green cards, which signify permanent residency status, would be withheld until the security steps were complete. Officials described a so-called border surge that envisions doubling the size of the Border Patrol with 20,000 new agents, constructing hundreds of miles of additional fencing along the border with Mexico and purchasing new surveillance drones to track would-be illegal border crossers. The cost of the additional agents alone was put at $30 billion over a decade. Other details were not immediately available, although it was expected that modifications to the bill would range far beyond border security provisions. The changes under consideration were the result of negotiations involving the bipartisan Gang of Eight who drafted the bill and Republicans seeking alterations before they would commit to voting for it. The officials spoke on the condition of anonymity because the talks were private. If agreed to, the changes could clear the way for a strong bipartisan vote within a few days to pass the measure that sits atop President Barack Obama's second-term domestic agenda. The developments came as Democrats who met with House Speaker John Boehner on Wednesday quoted him as saying he expected the House to pass its own version of an immigration bill this summer and Congress to have a final compromise by year's end. Boehner, R-Ohio, already has said the legislation that goes to the House in the next month or two will not include a pathway to citizenship for immigrants in the United States illegally. Precise details of the pending agreement in the Senate were unavailable, but Sen. John Hoeven, R-N.D., said it involved a major increase of resources to the border, including more manpower, fencing and technology. The underlying legislation already envisions more border agents; additional fencing along the U.S-Mexico border; surveillance drones; a requirement for employers to verify the legal status of potential workers; and a biometric system to track foreigners who enter and leave the United States at air and seaports and by land. It was unclear what other portions of the legislation might be changed. There is pressure from some Republicans to make sure no federal benefits go to immigrants who are in the country illegally, at least until they become citizens. "Our whole effort has been to build a bipartisan group that will support the bill," said Hoeven, who has not yet stated a position on the legislation. That's what this is all about, and it's focused on border security. Sen. Chuck Schumer, D-N.Y., one of the bill's most prominent supporters, said discussions with Republicans "have been really productive. We've made a lot of progress in the last 24 hours. Now we have some vetting to do with our respective allies. The potential compromise came into focus one day after the Congressional Budget Office jolted lawmakers with an estimate saying that as drafted, the legislation would fail to prevent a steady increase in the future in the number of residents living in the United States illegally. The estimate appeared to give added credibility to Republicans who have been pressing Democrats to toughen the border security provisions already written into the bill. Schumer and Sen. Bob Menendez, D-N.J., met at midday with Graham, Hoeven and Sen. Bob Corker, R-Tenn. The Democrats and Graham are part of Gang of Eight. If ratified, the compromise would mark concessions on both sides. Some Republicans have been unwilling to support a bill that grants legal status to immigrants in the country illegally until the government certifies that the border security steps have achieved 90 percent effectiveness in stopping would-be border crossers. On the other hand, Democrats have opposed Republican proposals to make legalization contingent on success in closing the border to illegal crossings. Under the legislation as drafted, legalization could begin as soon as a security plan was drafted, but a 10-year wait is required for a green card. One plan to change that was sidetracked on a vote of 61-37. Sen. Rand Paul, R-Ky., said his proposal would require Congress to vote annually for five years on whether the border is secure. While the public debate was taking place, lawmakers involved in the private talks expressed optimism. Across the Capitol, House Republican leaders sought to present a friendlier face to Hispanics - a group that gave Obama more than 70 percent support in last year's presidential election. Boehner met with the Democratic-dominated Congressional Hispanic Caucus, while rank-and-file members of his party reviewed areas of agreement with Latino religious leaders. "It's a conversation Republicans want to have," Rep. Cathy McMorris Rodgers, R-Wash., said later at a news conference outside the Capitol. Separately, the House Judiciary Committee approved legislation creating a program allowing farm workers to come to the United States to take temporary jobs in the United States.