Sen. Marco Rubio (R-Fla.), center, and other senators hold a news conference on immigration on April 18, 2013. (Charles Dharapak/AP)

Marco Rubio had changed his mind.

It was December 2012. The Senate gym. Sen. Richard J. Durbin (D-Ill.) was making the ask. “You ought to be a part of this,” Durbin told Rubio (R-Fla.), as Rubio rode a stationary bike. Durbin and six other senators wanted to rewrite U.S. immigration laws. In the process, they wanted to give illegal immigrants a way to become legal residents and — eventually — citizens.

Just two years earlier, Rubio had been against doing that. “It is unfair,” he had said, as a tea party candidate for Senate, “to create an alternative pathway for individuals who entered illegally.”

But that morning in the gym, he was open to the idea. He was in.

With that, Rubio began the most consequential work he has done in Washington. As part of a bipartisan “Gang of Eight,” he would write and pass a 1,198-page immigration bill through the Senate.

For a moment, that bill looked like the biggest success of Rubio’s career.

Now it looks like failure.

It turned out that Rubio had overestimated conservatives’ willingness to accept his hyper-complicated bill — and his own power to change their minds. Ultimately, the bill died in the House, his right-wing allies began to doubt his judgment, and both sides of the immigration debate grew irritated over Rubio’s tendency to change his mind.

Instead of a triumph, Rubio’s involvement with the immigration bill became a cautionary tale about a gifted freshman who had miscalculated his capability.

Now, as he begins a run for president, Rubio is left trying to run away from the most prominent item on his political résumé.

“It’s one of the worst squanderings of political capital I’ve ever witnessed,” said Steve Deace, an Iowa-based conservative radio host whom Rubio tried and failed to convince. “It was the first time he ever stepped out in public in leadership on an issue, and it was in diametric opposition to the base.”

Last week, when Rubio announced he was running, he made only a brief — and vague — reference to a desire to “modernize our immigration laws.” In an interview with NPR, Rubio sought to take credit for being — at varying times — on both sides of the same bill.

He had tried to pass it. And, at the same time, he had warned that it wasn’t good enough.

“I’ve done more immigration than Hillary Clinton ever did. I mean, I helped pass an immigration bill in a Senate dominated by Democrats. And that’s more than she’s ever done,” Rubio said. “It didn’t work because at the end of the day, we did not sufficiently address the issue of, of illegal immigration, and I warned about that throughout that process.”

From left, Sens. Jeff Flake (R-Ariz.), Rubio, Richard J. Durbin (D-Ill.), John McCain (R-Ariz.), Charles E. Schumer (D-N.Y.), Robert Menendez (D-N.J.), Lindsey O. Graham (R-S.C.) and Michael F. Bennet (D-Colo.). (Charles Dharapak/AP)
Much to lose

The “gang” that recruited Rubio was led by four senators with a combined 66 years in office. For them, something existential was at stake.

For Durbin and Sen. Charles E. Schumer (D-N.Y.), success would show that the Democratic-led Senate could still do what a Senate is supposed to: strike big deals, solve big problems.

For Lindsey O. Graham (R-S.C.) and John McCain (R-Ariz.), the goal was to fix Republicans’ terrifying disadvantage with Latino voters. After all, their party’s official “autopsy” of the 2012 election — in which President Obama had won 71 percent of the Latino vote — said Republicans had to embrace immigration reform. Or else.

“We’ll never see the inside of the White House” again, McCain liked to say, if the gang couldn’t strike a deal.

The other members were Robert Menendez (D-N.J.), Michael F. Bennet (D-Colo.) and Jeff Flake (R-Ariz.).

Rubio made eight. And on paper, he was perfect.

“He was bilingual in more than one way, right?” said Angela Kelley, then a staffer at the liberal Center for American Progress, who lobbied the group. “It wasn’t just English to Spanish.”

Rubio’s parents were born in Cuba, and he spoke movingly about their experience as immigrants. But Rubio was also beloved by the very sort of small-government conservatives who had blocked immigration reform in the past. With a foot in both those worlds, Rubio held enormous leverage, even with the veteran senators.

That was clear in one meeting, described by four lobbyists in the room, where the GOP senators were being asked to agree to more “guest workers” in the bill.

Without more of these temporary immigrants, the lobbyists said, some low-skill jobs would go unfilled. McCain, they said, suggested an answer. Couldn’t the children of illegal immigrants do those jobs?

Rubio, the son of immigrants, spoke up.

“He says, ‘Pardon me, Senator, but I have to say that the children of those illegal immigrants will be doctors and lawyers,’ ” one lobbyist recalled. “In my mind, I was like, ‘Thank God somebody said it.’ Because nobody else could say that to McCain.”

Rubio’s staff declined to comment. In an interview, McCain said he couldn’t recall saying anything like that. “That would contradict everything I’ve ever stood for and believe in about immigration,” McCain said.

Rubio’s influence also showed in negotiations over the details of the bill.

“People would talk, talk, talk. And he’d say, ‘I can’t sell that.’ And that would be it,” one Democratic staffer recalled. If Rubio said that conservatives wouldn’t go for a particular idea, the group believed him.

In particular, Senate staffers said, Rubio insisted that the U.S.-Mexico border had to be much-better secured to stop the flow of new illegal immigrants before any current illegal immigrant could be granted legal status. Along with other Republicans, he pushed for more visas for highly skilled immigrants and for an independent “border commission” to provide oversight of federal enforcement efforts.

Still, even when Rubio got what he wanted, he could seem skittish.

“Reports that the bipartisan group of eight senators have agreed on a legislative proposal are premature,” Rubio announced one day, just before others in the gang were about to announce progress in their talks. The veterans saw it as a dangerous airing of doubts, which might turn conservatives against them.

But they didn’t scold Rubio for long.

“McCain might pull out some article that somebody had given him and say, ‘What is this?’ And Marco would sort of say, ‘What do you want me to do? I’m under a fire here,’ ” the Democratic staffer said. Other staffers familiar with the talks described the dynamic in similar ways. “What, are we going to kick him out? There was nothing we could have done to Rubio.”

After that break, Rubio came back to the fold. Finally, the gang agreed on a bill.

“Actually, I changed my mind,” Rubio said at the news conference, jokingly turning away from the lectern as if to flee.

“Not again!” Schumer said. “Once is enough!”

‘The Full Marco!’

Now the salesman had to sell.

“Isn’t it reasonable for these conservatives to assume that, uh, you’ve been duped here?” conservative radio host Laura Ingraham asked.

“No. It isn’t,” Rubio responded, citing items that Republicans had demanded in the talks. “They [Democrats] have come to our position. We haven’t gone to theirs.”

Rubio sounded tired. But he was still going.

Illegal immigrants are “not going to leave unless you literally go and apprehend them, put ’em on a plane and send them back,” he told Ingraham. The Senate bill would have offered illegal immigrants a 10-year path to a “green card” and then to citizenship three years later. As long as they paid fines, passed a background check and learned English. “The millions of people that are here now, if they’re not going to go back home . . . what’s an alternative to that” that’s still difficult and rigorous? Rubio asked.

He did Limbaugh. He did Hannity. He did private meetings with influential conservative activists and writers.

And on April 14, 2013, Rubio did the talking-head version of an ultramarathon: all five Sunday chat shows in one day, a rarely completed feat known as the “Full Ginsburg” (after the lawyer for Monica Lewinsky who was the first to do it, in the 1990s). And then Rubio did two more, on Telemundo and Univision, in Spanish.

The Full Marco!” Politico called it.

“Patch over his eye, knife in his mouth, going to defend the Senate bill in talk-radio land,” Frank Sharry of America’s Voice, a group that supported the immigration bill, said in an interview. “I’ve just gotta give him credit. Because he was taking the fight to the conservative media, in the spring of 2013, in a way that nobody ever had.”

But, on conservative media, he didn’t seem to be winning the fight. Rubio’s right-wing interviewers were often respectful but unconvinced. In fact, they turned the tropes of the fight against “Obamacare” — the fight that helped launch Rubio’s career — back on the young senator.

“You’ve got this thousand-plus-page bill that purports to fix immigration,” talk radio host Lars Larson started in.

“It’s 840 pages, to be exact. Not a thousand,” Rubio said. (It grew later.) “But, anyway, a lot of pages.”

Rubio also faced conspiracy theories from conservatives who had dug through the bill and thought they knew what it was hiding.

“Move over, Obama-phone. This is the amnesty phone,” Ingraham said, mentioning a provision that some thought would give free phones to immigrants.

“That’s false,” Rubio said. It was. The phones were meant for isolated ranchers on the border: They were for reporting illegal immigrants, not to reward them.

Rubio’s office had to debunk the rumor, then debunk it again the next week when the first debunking didn’t take. Then the rumor changed, and the debunking had to start over.

“[Conservatives] have heard that it creates a taxpayer subsidy for people to buy a car or a scooter,” Rubio said at one point on the Senate floor, sounding exasperated. “That’s just not true.”

Democrats on the committee were impressed by his willingness to take fire. (“He didn’t realize what he was getting into,” a second Democratic staffer said. “And that’s part of the beauty of new members.”) But then, Rubio started voicing his own doubts. After weeks of trying to convince conservatives, it seemed that he had become unconvinced instead.

“We’ve got a bill that isn’t going to become law,” Rubio told radio host Hugh Hewitt. He said he couldn’t support his own bill, because it wasn’t conservative enough to pass the GOP-led House. Without amendments, he said, “I think we’re wasting our time.”

That rift, too, was mended. Rubio came back. The bill was amended, to double the number of federal border agents. It came up for a vote, and on June 27, Rubio gave his closing argument.

He spoke eloquently about his parents, about how the first words his father learned in English were, “I am looking for work.” He recited the inscription on the Statue of Liberty: “Send these, the homeless, tempest-tossed, to me. I lift my lamp beside the golden door!”

“Here in America,” Rubio said at last, tapping the old Senate desk, “generations of unfulfilled dreams will finally come to pass. And that’s why I support this reform. Not just because I believe in immigrants, but because I believe in America even more. I yield the floor.”

The bill passed.

“An incredibly articulate spokesperson for the things we stand for and believe in,” McCain called Rubio, when the group assembled for a triumphant news conference after the vote.

But at that point, they were no longer a gang of eight.

Rubio didn’t show up.

Failure in the House

“His goal was to get a bill through the Senate,” said Alex Conant, who worked for Rubio at the time and is now a spokesman for Rubio’s political committee. And since the Senate had passed the bill, he said, Rubio didn’t need to attend. “He was not going to be part of any effort that would put pressure on the House, because he thought that it was going to be counterproductive,” Conant said.

Presidential hopeful Sen. Marco Rubio (R-Fla.) outlined what he would do as president to tackle the immigration problem on CBS’s “Face the Nation.” ( Reuters)

Rubio also did not participate in a massive effort, organized by Schumer, to lobby members of the House to take up immigration reform. In interviews, Rubio’s sense of urgency seemed to be fading.

“I hope eventually we’ll solve this problem,” he told Sean Hannity on Fox News that July, the month after the bill passed. “Look, it’s not the most important issue facing America. Obamacare is more important, for example.”

As weeks passed, it became obvious that the House was not going to take up immigration anytime soon. It never did.

“I will admit to failure,” said McCain, the only member of the Gang of Eight who agreed to be interviewed for this article. McCain said he did not think Rubio was more at fault than any other senator. “We obviously weren’t able to get our position or our advocacy accepted by the House of Representatives, so that was clearly a failure. But it wasn’t a failure of Marco any more than me.”

Now, with his presidential run underway, Rubio has changed his mind about the bill he helped to write.

He says he would not support it today. Too big. Tried to do too much at once. Instead, Rubio wants to break the reforms up into smaller bills, starting with increased enforcement on the border.

Rubio leaves the stage after speaking at the Conservative Political Action Conference in February. (Andrew Harrer/Bloomberg News)

“What I’ve learned is you can’t even have a conversation about that until people believe and know — not just believe, but it’s proven to them — that future illegal immigration will be controlled,” Rubio said at the Conservative Political Action Conference this year. After the border is secured, he said, Congress can start talking about what to do with those already here.

If immigration reform is ever proposed again in the Senate, Rubio probably will not be there to see it. If he continues his run for president, he cannot run for reelection in Florida. He goes to the White House, or he goes home.

That idea made Giev Kashkooli, who works for the United Farm Workers of America labor union, think of a moment with Rubio during the immigration fight. As they and others waited for a meeting with veteran Sen. Dianne Feinstein (D-Calif.), Rubio marveled at Feinstein’s office wall.

It was covered with framed copies of bills she’d helped pass, mounted with the pens that presidents had used to sign them. The trophies of big fights won.

“I’d like to have an office like this,” Kashkooli remembered Rubio saying.

Ed O’Keefe, Peyton Craighill and Scott Clement contributed to this report.