South Carolina Sen. Lindsey Graham wanted to get away last week from the immigration bill and hit the world-class Pebble Beach golf course in California.

But another Republican was on his mind: Sen. Rob Portman.

Graham and the rest of the Gang of Eight had just made an offer they believed Portman couldn’t refuse: They would agree to quietly slip in the Ohio Republican’s so-called E-Verify plan into a bigger border security package — in exchange for securing Portman’s vote for their immigration bill.

The battle for the 69th vote — in this case, Portman — shines a light on the tense, behind-the-scenes horse trading to inflate the vote tally for the immigration bill, which is expected to pass the Senate this week. Proponents of the overhaul are pushing to get more than 70 votes — in hopes that such a large total will pressure the House into action — and they need the support of a handful of wayward Republicans to get there.

Winning the support of a senator like Portman — a Washington veteran who is respected by party elders, was on Mitt Romney’s shortlist for his running mate and could have his eye on higher office — could carry additional weight among House Republicans skeptical about the proposal.

Now Portman’s amendment is central to the last-ditch negotiations at the Senate’s highest levels as negotiators try to put the finishing touches on the most ambitious rewrite of federal immigration laws in a generation. But Portman’s push is hitting snags in the final hours of the floor debate: Rank-and-file Democrats complain that their amendments should be given precedence, while GOP opponents are trying to kill Portman’s plans, hoping to keep him on their side.

The jostling also sheds light on the way bill proponents, and Senate leadership, have successfully shepherded the most significant piece of legislation this year: mostly via back channels and insider negotiations, with deals reached privately to lock up senators’ votes — rather than amendments adopted publicly on the Senate floor.

In the runup to the border package that was unveiled last Friday by GOP Sens. Bob Corker of Tennessee and John Hoeven of North Dakota and the Gang of Eight, Portman was in the negotiators’ cross hairs. The Gang had worked for about a month, negotiating and fine-tuning Portman’s language aimed at tightening new requirements for employers to verify the legality of their employees. Graham, GOP Sens. Marco Rubio of Florida, Jeff Flake of Arizona and Democratic Chuck Schumer of New York, all lobbied Portman to add his language to their bill.

“We would have liked to have added Portman,” Corker said.

But Portman had to pay a price: He had to vote for and co-sponsor the Gang’s bill, GOP aides familiar with the situation said.

Portman wouldn’t commit to voting for the immigration bill even if his E-Verify language was included as part of the Corker-Hoeven package. So Senate negotiators dropped the Portman language from Corker-Hoeven, putting its future on an uncertain path.

Portman opposed advancing Corker-Hoeven’s border deal on a procedural vote Monday evening. Instead, he wants a separate, stand-alone vote on the Senate floor, something that hasn’t been granted to many of his colleagues. He warns that his support for the overall bill hinges on whether he gets that vote.

If he had inserted his language into the border deal, as the Gang wanted, the House would promptly ignore it when the full legislation gets to the lower chamber, Portman argues.

“It deserves a separate vote,” Portman said Tuesday. “I spent a month working on this, making concessions to the Gang of Eight and worked it on a bipartisan basis. … I believe if we have a vote, and we have a debate — I believe it will pass, I believe it will be bipartisan and I believe it will send a strong signal to the House that it has to be in the final product.”

But Portman, his critics say, has made the situation unnecessarily harder — if not impossible — to resolve in the final days of Senate debate.

“People were kind of banging their heads against a wall because we want him to get to yes, and here’s a path to get to yes, let us help you,” according to a Senate source familiar with the talks, who asked for anonymity to speak candidly about the situation.

Indeed, to win other senators’ backing, the Gang already added to the border security amendment several sweeteners: provisions to help fisheries and the seafood industry sought by the two Alaska senators, a $1.5 billion summer jobs program demanded by Sen. Bernie Sanders (I-Vt.) and a plan pushed by Sen. Susan Collins (R-Maine) to ensure homeland security grant money is spread beyond the southern border. All those senators voted to advance the Corker-Hoeven package Monday evening.

Given the rules of the Senate, there is no guarantee that Portman’s plan would be adopted — or can even get a vote since any one senator can block a vote from occurring.

Senate Majority Whip Dick Durbin (D-Ill.), another member of the Gang, said Tuesday he was surprised by Portman’s insistence that the E-Verify proposal be considered by the Senate separately.

“He wants his day on the floor — and every senator is entitled to that, but I think we were close to agreeing to his amendment before that,” Durbin said.

Asked if he were frustrated at Portman, Durbin said: “You got to get over frustration if you want to see a bill passed.”

Now Portman’s plan and his vote are in limbo, even as he defended his tactics on Tuesday.

“It’s not risky,” Portman said outside the Senate chambers. “It’s ensuring we do have attention paid to this. If it had been part of the package, it would have been viewed as having been an afterthought.”

Critics say that Portman appears eager for the spotlight, so he can point to a specific vote and amendment that was adopted to boast about how he toughened the workplace enforcement aspect of the bill.

But Portman argued that the workplace verification issue is the “most important part” of the immigration bill. Without his backing, there is no natural constituency for this particular proposal, since both labor and business are hardly cheerleaders of efforts to strengthen E-Verify.

Under the current immigration bill, all employers would have five years to phase in an E-Verify system, with companies that employ more than 5,000 people required to do so within two years and those with more than 500 workers given three years. Noncitizens would be required to show a biometric work ID card.

Portman’s plan would expedite the implementation of the E-Verify program and take steps to prevent identity fraud, increasing federal grant money from $250 million to $350 million for states that share key information and detail additional security measures employers should take if they cannot authenticate a worker’s identity.

The amendment — which is co-sponsored by Sen. Jon Tester (D-Mont.) — is relatively noncontroversial, and both sides say they are willing to adopt it.

But it is all tied up in the final round of amendment negotiations, with both sides pushing for an equal number of votes. Senate Judiciary Chairman Patrick Leahy (D-Vt.) is reluctant to give Republicans more amendment votes at the expense of his fellow Democrats, while Republicans hope to keep Portman as a ‘no’ vote, giving them little incentive to relent.

Asked if he would vote for the bill if his amendment were adopted, Portman said: “I can’t vote for it without it. … I think it is absolutely incredible that we wouldn’t have a vote on such a critical issue.”