“Will you come back, even if I fail?”

I covered three of Senator McCain’s political races — his 2008 White House race, and his 2010 and 2016 Senate re-election campaigns — and each time two Mr. McCains would show up.

The first Mr. McCain was the one the public saw a lot on television: irreverent, cheerful, reverential — of veterans, senior voters, Gold Star mothers, small-business owners — and thoughtful about policy.

That man dominated his successful attempt to capture the 2008 South Carolina primary, a candidate of boundless energy soaking up a blur of V.F.W. halls, vinegar barbecue joints and endless rounds of TV golf watched with Senator Lindsey Graham in the back of a bus. Reporters dragging themselves to a 6 a.m. van call would find Mr. McCain fully caffeinated, probably from a breakfast with a donor an hour earlier. “Come on, jerks!” Mr. McCain would bellow, his grinning, pink face poking out from under a hat.

The other Mr. McCain, brooding, impatient and sometimes dismissive, seemed to surface when he was uncomfortable with the bend that politics had put in his road. In 2010, when confronted by voters who questioned Barack Obama’s birthplace, that Mr. McCain stared at the floor uncomfortably, unlike the one in 2008 who had steadfastly defended his opponent. As I observed him under the relentless sun of southern Arizona trying to defend his multiple immigration positions, he shot me the occasional stony glare.