Early in John McCain's 2008 presidential bid, when his campaign was faltering and lagging in the polls, he visited Iraq with Senate colleague Lindsey Graham. Gen. David Petraeus allowed the former Vietnam prisoner of war to address the hundreds of soldiers.

"I remember about 2,000 soldiers wanting a photo, and every one of them got it," Graham recalled during a speech on the Senate floor Tuesday, three days after McCain's death. "I remember being so hot I couldn't breathe, but we stayed anyway."

Returning to the U.S. with a renewed determination, McCain went on to win the GOP nomination, only to lose handily to Barack Obama in November. As Graham has traveled around the world in the years since, he said people constantly tell him how fondly they remember the concession speech McCain delivered.

"John said that night, 'President Obama is now my president,'" Graham said. "So he healed the nation at a time he was hurt. I learned that serving a cause greater than yourself hurts. Anybody in the military can tell you the risk you take. He couldn't put his jacket on, he couldn't comb his hair because he got hurt serving a cause greater than himself."

Graham offered an emotional 17-minute eulogy in the first of a series of speeches that South Carolina's senior senator will give in the coming days in remembrance of his longtime best friend and political wingman. Graham is scheduled to speak at McCain's memorial service Saturday at Washington National Cathedral and then again at his burial ceremony Sunday at the Naval Academy in Annapolis.

Standing next to McCain's desk on the Senate floor, which was draped in black cloth with a vase of white roses on top, Graham delivered an "after action report" — a military term for a post-mission analysis — on McCain's life, or what he termed "Operation Maverick."

"A relationship with maverick brought joy and difficulty," Graham said, failing to fight back tears. "Both were your constant companion. He was a difficult man. He could be tough. But the joy that you received from being with him will sustain you for a lifetime, and I am so lucky to have been in his presence."

In their years together in the Senate, the South Carolina and Arizona Republicans worked together often, united by their shared hawkish foreign policy approach. But Graham said critics who believed McCain wanted endless wars were wrong.

"He wanted sustainable peace and understood the consequences of not seeing it through," Graham said.

Graham and McCain, two-thirds of what Petraeus nicknamed "the Three Amigos" along with former Connecticut Sen. Joe Lieberman, also shared a tendency to rebuke the more conservative elements of the GOP base.

They both served, for example, on the bipartisan "Gang of Eight" that proposed a compromise immigration reform package in 2013 that drew howls from hardliners and never received a vote in the House.

Sign up for updates!

Get the latest political news from The Post and Courier in your inbox.

"He taught me that principle and compromise are not mutually exclusive," Graham said. "He taught me that immigration, as hard as it is to solve, somebody's got to do it. And he said to me, with Ted Kennedy, you're going to learn Lindsey that the other side has to get something too. I have learned that lesson."

McCain served as an ideal role model for ambitious young people, Graham said.

"He failed a lot, but he never quit," Graham said. "And the reason we're talking about him today, and the reason I'm crying, is because he was successful in spite of his failures."

Since McCain's death Saturday at age 81, Graham said he's been approached by cab drivers, waiters and cops, expressing their condolences for his loss.

"My name is Graham, not McCain," Graham said. "But I feel like a McCain. I don't know if I've earned that honor, but I feel like it."

Graham said McCain's passing would leave a significant void in the Senate that he could not fill.

"Don't look to me to replace this man," Graham said Tuesday. "Look to me to remember what he was all about and try to follow in his footsteps. If you want to help me, join the march. If you want to help the country, be more like John McCain. I believe there's a little John McCain in all of us, and a little of John McCain practiced by a lot of people can make this a really great nation."

Follow Jamie Lovegrove on Twitter @jslovegrove.

Jamie Lovegrove is a political reporter covering the South Carolina statehouse and congressional delegation. He previously covered Texas politics in Washington for The Dallas Morning News and in Austin for the Texas Tribune.