Yet nothing about McCain—not his wartime memories or the down moments of his political career—was ever gloomy. On the contrary, his wicked sense of humor tended to triumph. When confronted with bad news, he’d often remind staff of the “immortal words of Chairman Mao” that “it’s always darkest before it’s completely black.” (Mao didn’t actually say this, and McCain knew it.) On a visit to Antarctica, he threatened—facetiously, I chose to believe—to leave me in Ernest Shackleton’s hut when the plane departed for home. When we hit turbulence on airplanes, he’d note that he had successfully crashed multiple planes and lived to tell the tale, so not to worry—we’d all be fine. Over one period of months we watched the HBO series Da Ali G Show in its entirety, leaving him eager to sit for an interview with Ali G himself—and figuring he could give as good as he got. (We suggested that this was not the best idea).

When it came to matters of national security, however, McCain was deadly serious. The senator pushed for the muscular use of American power in pursuit of the nation’s interests and in defense of its values. He cared not just about Iran, Iraq, North Korea, and Russia, but also about places like Burma, Belarus, Kyrgyzstan, and Cambodia. He valued American alliances and the ideals that infuse them, he believed that the liberal order established after 1945 was worth defending, and he was convinced of America’s unique responsibility to take on burdens others would rather shed.

John McCain was graceful, too, even amid his generally blunt and sometimes combative demeanor. I watched him speak quietly to grievously injured servicemen and women in the military hospital in Landstuhl, Germany. I saw him tour the old prison in Hanoi and then discuss improving national ties with Vietnam’s leaders. I witnessed him sit patiently with the few remaining dissidents in Uzbekistan and pledge support for their cause. And on election night 2008, I stood on the grass at Phoenix’s Biltmore Hotel while McCain gave a concession speech for the history books. Pledging to help Barack Obama lead the American people through the days to come, he wished “Godspeed to the man who was my former opponent and will be my president.” It seems almost quaint, this graciousness in the face of political defeat, a vestige of better political times. Our leaders today could learn much from it.

It was this grace that struck me most during my last visit with McCain. In March, sitting together outside his cabin in northern Arizona, we watched a creek flow around a hill and through the trees. We spoke not of Trump, or of Washington gossip, or even of old war stories, but of things a touch more profound. John—and it was always “John” to his staff and friends—wanted to talk history, and about his time in Arizona. We chatted about the Battle of Borodino, Stalin’s 1930s show trials, and the generalship of Ulysses S. Grant, and about the land he and Cindy had developed outside Sedona. While everyone he knew fretted over his health and feared what was in store, his demeanor was far more serene. He was thankful, he said, for his family and visitors, for the opportunity to serve his country, and for the life he’d lived.