John McCain was hustling down the hallway in the Russell Senate Office Building with the purpose of an Aaron Sorkin character. It was not yet two weeks into Donald Trump’s presidency, and McCain had already become the fiercest Republican critic of the new administration. While party leaders like Paul Ryan were contorting themselves to defend even Trump’s most ill-conceived executive orders, McCain had been, for a member of the president’s party, on fire: He had criticized Trump for banning immigrants and refugees from seven Muslim-majority countries, for his failed first mission in Yemen, for his suggestion that he might lift sanctions against Russia; he even took diplomacy into his own hands, reaching out to Australia to assure the country of our continued friendship after Trump had bizarrely confronted its prime minister in their introductory phone call. By many measures, there is no one better positioned to challenge Trump from within his own party. The so-called maverick was just reelected to the Senate by a 13-point margin; at 80 years old, he has both significant stature and nothing to lose. Still, for McCain, opposing Trump is not a simple matter. For one thing, it’s tricky to challenge a vengeful president who has taken to Twitter to accuse McCain of “emboldening the enemy” and “trying to start WWIII.” For another, McCain is not a Republican in Name Only; he is a true believer, an elder of the tribe. He does not exactly relish being deemed the loyal opposition.

“What? What!” McCain barked as he ran into a throng of reporters.

“Some people are saying you’re Trump’s No. 1 nemesis,” a reporter said. “Is that the role you’re trying to stake out?”

McCain shook his head. “It’s very convenient for the media to say that,” he grumbled. “If interpreters who worked for us in Iraq are not allowed into the United States, then I’m going to speak up. If that makes me a nemesis of the president of the United States, then you can label me as such.”

“They want a scenario of, quote, ‘confrontation,’ ” McCain told me as we stepped into the elevator. McCain was on his way to lunch in the Senate Dining Room with his friend Lindsey Graham, the other Republican Trump critic in the Senate whom many Democrats look to with hope. He found Graham at a corner table in the back.

“A group of ’em stopped me and said, ‘Are you Trump’s nemesis?’ ” McCain recounted. “I said, ‘That’s such a convenient thing.’ ”

“It’s actually boring,” Graham said. “There are a lot of sins in life, but the one that’s intolerable is being boring. I hate boring.”

McCain shook his head at the notion that just because he had the temerity to criticize the president, congressional Democrats thought they could recruit him to their cause. “These are the same Democrats that shredded me in 2008,” he said. “I get along with the Democrats, but please, I’m not their hero. They’re trying to use us. We will work with them, but have no doubt, their agenda is not our agenda.”

Yes, lest anyone forget, McCain and Graham, like many of their Republican brethren, came into this administration almost giddy with the possibility of what could be enacted with both chambers of Congress and the White House under GOP control. McCain said he was enthusiastic about Trump’s plans to slash regulations and increase military spending, and he is a fan of Defense Secretary James Mattis, with whom he said he’d spoken nearly a dozen times that week. He is also gleeful about Trump’s conservative Supreme Court nominee, Neil Gorsuch, who stopped by the table with Kelly Ayotte, the former Republican senator (and Trump critic) from New Hampshire, who is helping Gorsuch through his confirmation process.

“Judge! How are ya?” McCain said, bolting up to shake Gorsuch’s hand.

Graham called across the table: “Anybody who wants to poison the water and adulterate the food is a good man for me!”

Gorsuch and Ayotte gave Graham panicked looks.

“Didn’t you hear what Nancy Pelosi said?” Graham asked, referring to the House minority leader’s comment that Gorsuch should be considered a lousy pick by anyone who breathes air or drinks water. “She said if you eat it or drink it, he’s bad!”

Gorsuch forced a relieved smile, getting the joke.

“The Democrats are just off the reservation. They’re crazy the way they’re behaving,” McCain said to Gorsuch. “As for hearings, I’ve never seen anything like this. Just keep your flak jacket on. Steady as she goes.”

No one knew it at the time, but this congenial lunch was perhaps John McCain’s last sanguine moment about the Trump administration. In the two weeks since, he has watched as allegations about Russian involvement in the election — and possibly in American foreign policy — picked up steam, and as Michael Flynn was forced to resign as national-security adviser after revelations that he improperly discussed sanctions with the Russian ambassador (and then lied to the vice-president about it). To McCain, these are red-line issues. No matter how much he likes the prospect of deregulation, the compromising of America’s sovereignty was pushing him closer to the barricades.

“The severity of this issue, the gravity of it, is so consequential because if you succeed in corrupting an election, then you’ve destroyed the foundation of democracy,” he told me later. “So I view it with the utmost seriousness. I view it more seriously than a physical attack. I view it more seriously than Orlando, or San Bernardino. As tragic as that was, the far-reaching consequences of an election hack are certainly far in excess of a single terrorist attack.”

Now McCain is renewing his calls for a bipartisan select committee to look into Trump’s ties to Russia, which could ultimately put pressure on the Justice Department to appoint a special prosecutor — a probe that could get perilous for the president. While he is meeting with resistance from party leaders so far, McCain plans to use his role as chair of the Armed Services Committee and ex officio member of the Intelligence Committee to push for answers. The Trump administration’s viability rests on the support of a Republican Congress, and what John McCain is doing, carefully but with growing fervor, could shake its foundations.

Photo: Nigel Parry

The story of McCain’s captivity in Vietnam has been told so many times it can now be rendered in shorthand: 1967, a bombing raid over Hanoi, his plane shot down, both arms and a knee broken, capture, torture, the prospect of early release refused on principle, an ordeal that lasts for more than five years, much of it spent in solitary confinement, during a war that most of the country had already given up on. It’s the story that made McCain’s political career, that’s been trotted out in six Senate campaigns and two presidential bids. But it also undeniably shaped McCain’s view of the world and America’s place in it. “I fell in love with my country when I was a prisoner in someone else’s,” he said during his nomination acceptance speech at the 2008 Republican convention. “I loved it for its decency, for its faith in the wisdom, justice, and goodness of its people. I loved it because it was not just a place but an idea, a cause worth fighting for. I was never the same again; I wasn’t my own man anymore; I was my country’s.”

McCain believes in the idea of American exceptionalism, that the United States has a responsibility to be a force for good in the world and to confront repressive regimes. The Trump doctrine — to the extent that one exists — is quite different: American foreign policy should be dictated by nationalist self-interest at almost any cost. During the 2016 campaign, Trump advocated for reintroducing torture as a means of extracting information, killing terrorists’ families, and seizing Iraq’s oil. He derided international institutions such as NATO and the U.N. and cheered when Britain voted to pull out of the European Union. He praised brutal strongmen from Saddam Hussein to Vladimir Putin, whom he’s called a more impressive leader than Barack Obama.

McCain has been arguing for years that Putin’s Russia is a global menace that must be confronted. “Russia’s leaders, rich with oil wealth and corrupt with power, have rejected democratic ideals and the obligations of a responsible power,” McCain said during his 2008 RNC speech. “They invaded a small, democratic neighbor to gain more control over the world’s oil supply, intimidate other neighbors, and further their ambitions of reassembling the Russian empire.” He sees Russia as a bully with designs on rolling back the spread of democracy in Eastern Europe and controlling the Middle East with Iran, fundamentally threatening America’s place in the world. “Putin won’t stop until the cost of going forward is too high,” McCain told me.

The senator has challenged presidents of both parties when their foreign-policy directives ran counter to his own. In his first term in Congress, he criticized Ronald Reagan’s decision to station peacekeeping Marines in Beirut with minimal defenses, which resulted in the deaths of 241 service personnel when a suicide bomber drove straight into the barracks. His battles with George W. Bush over tax cuts, torture, and U.S. strategy in Iraq became the stuff of Washington lore. And during the Obama years, McCain was one of the president’s fiercest foreign-policy critics, finding fault with his decision to pull troops from Iraq and his refusal to enforce his “red line” on Syria after Bashar al-Assad used chemical weapons against his people.

And yet it would be grossly inaccurate to characterize McCain as a man of pure principle. He’s too complicated for that. What makes him inspiring — and infuriating — to people on both sides of the aisle is that, more than most politicians, his political acts span a particularly wide distance between courage and expediency. He is capable of true heroism and conspicuous political cowardice. Over the years, he’s flip-flopped on some of his signature issues, from unfunded tax cuts to immigration reform to upholding Roe v. Wade. He’s often on the phone, dialing up friends and advisers to gauge their opinions and weigh the risks and rewards of various courses of action.

I get along with the Democrats, but please, I’m not their hero. They’re trying to use us. We will work with them, but have no doubt, their agenda is not our agenda.

This is how it came to be that the same McCain who cares so deeply about America’s standing in the world also cynically named as his ’08 running mate Sarah Palin, thus arguably ushering in the era of Trumpism that he now finds so troubling. He still defends the choice. “The media went after her like I’ve never seen,” he told me. “They said she said, ‘Oh, I can see Russia from here.’ Well, Russia is not that far from Alaska! They destroyed her in a way I will never forgive them.” In private, he has been more candid. “I regret running a small campaign,” he told a friend.

Still, according to his advisers, McCain’s reaction to Trump is mostly from the point of view of his better angels. To an extent far greater than McCain himself will say, they describe McCain as finding Trump to be a true threat to the republic. McCain speechwriter Mark Salter said the Trump administration presents a challenge to the senator’s core values. “McCain has always had empathy and compassion for oppressed people. It affects his views on torture and the way we should conduct ourselves in the world. It’s anathema to the Trump-Bannon-Sessions worldview. That’s not really Realpolitik — it’s fanatical. It’s bleak. Take their oil? Kill their families? It’s like a cartoon villain and is against everything John McCain stands for.”

The antipathy between the two started during the campaign when McCain criticized Trump for calling Mexicans “rapists,” attacking an Indiana-born judge of Mexican descent, and denigrating the Muslim parents of a slain Iraq War soldier. Trump said McCain wasn’t a “war hero” because he’d been captured by the North Vietnamese and so couldn’t fight (“I like people that weren’t captured,” said Trump). Trump adviser Steve Bannon’s media arm, Breitbart, has gone after McCain repeatedly, even claiming he created isis. “Bannon, who I don’t know, was clearly doing the stories,” McCain told me. On top of that, Trump’s financial backers, Robert and Rebekah Mercer, donated heavily to a PAC backing McCain’s pro-Trump primary challenger.

Though many expected McCain to take a firm stand against Trump the candidate, he refused to join the Never Trump movement led by Mitt Romney. “Romney was pissing on Trump in a way that almost made you feel bad for Trump,” one McCain adviser told me. Some McCain associates said he was worried about reelection; others that it was party loyalty that kept him from publicly opposing Trump. Whatever the case, it wasn’t until the Access Hollywood tape leaked in October that McCain announced he wasn’t voting for Trump. Like most of the political Establishment, he thought Hillary Clinton was going to win. “We had several discussions prior to the election about his hope he would be able to work well with Hillary Clinton,” said McCain’s friend Grant Woods, an Arizona lawyer.

When Trump won instead, McCain decided to give him the benefit of the doubt. It’s hard to imagine, but McCain saw something of himself in the new outsider president, according to Woods. McCain had been reviled by the party’s base much as Trump had been rejected by the GOP Establishment. “Only eight years ago, John was the nominee of the GOP and wasn’t the first choice of a lot of the party diehards,” said Woods. “He and his allies made the point that he won the nomination fair and square. That’s a complicating factor in his mind.”

McCain wanted to work with Trump. During the transition, Trump called McCain and asked for recommendations for Defense secretary. McCain suggested David Petraeus, Mattis, and Ayotte. (“She didn’t support me!” Trump told McCain.) McCain has supported all of Trump’s Cabinet picks — Rex Tillerson, Jeff Sessions, Betsy DeVos, Tom Price, and Scott Pruitt — save one, budget director Mick Mulvaney, whom he views as anti-military. “I’ve always given presidents the benefit of the doubt on their nominees,” McCain told me. “With Obama, there were a number of nominees I had concerns about that I voted for. I think elections have consequences.”

Beyond that, McCain recognizes the sway Trump has over a significant swath of the Republican electorate. “There is frustration out there that to me is understandable. There’s a lot of friends of mine who are older white males that contact me all the time and say, ‘Stick with Trump! What’s the matter with you, John?’ I said, ‘Well, we have some disagreement about trade,’ and they say, ‘You don’t care about America!’ I try to be nice, but they’re fired up.”

McCain thinks an increasingly divided nation is a bigger worry than the possibility of the Trump administration’s turning into an authoritarian regime. “I just don’t think it’s possible in our society. There’s too many checks and balances. The danger is not Trump perverting our Constitution or taking too much power; the danger is the polarization of America.”

Of course, the two dangers are not unconnected: The country’s polarization leads senators and congressmen to fear being primaried by more Trumpian candidates, and that in turn leads them to forget all about checks and balances. So far, Republicans in both houses have rallied around the new president’s appointments and policies. Even those who criticized Trump during the campaign, like Ted Cruz and Jeff Flake, are mostly falling into line. When I saw Cruz in the days after Flynn’s resignation, he stuck with the party line, saying how happy he was with Trump’s conservative Cabinet picks. And Flake, though he issued a statement against the travel ban, has been generally supportive as well: “In terms of regulations, repeal two for every one? I’m excited about a lot,” Flake told me.

For his part, McCain has wrestled with when and how to respond to Trump’s statements and policies. Recently, he told his former presidential-campaign strategist John Weaver: “I can’t be the car alarm that always goes off. If I am, I’m not effective.” Still, McCain is sounding the alarm more and more frequently. The senator issued a statement blasting Trump’s decision to abandon the Trans Pacific Partnership trade deal. “I just think we made a terrible mistake,” he told me. “We’ve consigned 60 percent of the world’s economy to China.” And of course there was his critical statement about the Trump-authorized Navy seal raid in Yemen that resulted in a seal’s death, some 30 Yemeni casualties including women and children, the destruction of a $75 million aircraft, and the end of U.S. ground operations there. “These are challenging times, and I have to go my own way,” McCain said. “It’s not disloyalty to the party.”

Those acts of open criticism have put McCain in Trump’s crosshairs. When McCain spoke out about the botched raid, Trump fired off a series of tweets: “Sen. McCain should not be talking about the success or failure of a mission to the media. Only emboldens the enemy! He’s been losing so long he doesn’t know how to win anymore.” Although McCain has 2 million Twitter followers, he rarely uses the medium to respond to Trump directly. Instead, he relies on his social-media army of campaign volunteers, which he calls Troll Team Six. “They attacked and responded to every attack,” McCain said. “To a large degree it neutered the campaigns against me.”

Even for someone who is always keenly aware of the political calculus, navigating the Trump administration is challenging. For one thing, you never know where the president is going to come down on anything. “I don’t know what he’s going to do,” said McCain. “Look at his stance on torture. Or everything. He’s been on all sides. He said intelligence groups are like Nazis, but then he said they’re the greatest in the world. So I have to judge him on what he does.”

In the meantime, McCain is feeling pressure from all sides. He took heat from friends for defending Flynn in the weeks before he resigned because of revelations that he had lied about his conversations with the Russian ambassador about U.S. sanctions. “What am I supposed to say? I can’t be bad-mouthing everyone over there,” McCain told an adviser. But when McCain does openly criticize Trump, he often finds himself on his own. He’s complained to friends that fellow Republicans aren’t backing him up. “I keep looking behind me, and there’s no one there,” he recently told an adviser. When Senate Majority Leader Mitch ­McConnell nixed McCain’s initial request for a select committee on Russia, McCain groused to a friend that “fucking Mitch ain’t gonna do it!” (McCain denied saying this.)

If McCain is a lone dissenter, his opposition could get less and less traction. His power rests in his ability to persuade his fellow Republicans, but remaining relevant is also personal for him. He has seen it happen before — life leaving soon after power did. The commanding wooden desk in McCain’s office belonged to his predecessor, Barry Goldwater, who barely won reelection during his final campaign. “When he left Washington, he never came back,” McCain said. Next to the desk, McCain displays a photograph of his grandfather on the deck of the USS Missouri when the Japanese surrendered during WWII. The day after returning home from the Pacific in 1945, he died.

McCain is constantly weighing his legacy, torn between doing what it takes to stay effective inside his party and choosing the right moments to go his own way. He is a deeply ambivalent maverick. Still, McCain’s friends and advisers say this fight is the one he was made for. “Whether McCain likes it or not, history has prepared him for this moment,” Weaver told me. “I talked to him just after Christmas. I said, ‘I know, John, you’ve been through a lot in your life, but the country’s never needed you more than it does now. We live in dark times.’ And he said, ‘Boy, you don’t know how dark it is.’ ”

Senator Lindsey Graham. Photo: Nigel Parry

Given the slumping poll numbers that accompanied Trump’s erratic first weeks in office, some Republicans say it’s only a matter of time until skeptics like McCain can break with Trump without political consequences and even pull other members of the party with them. “Based on my private conversations with Republicans, at first the feeling was, ‘We want to make this work.’ But after the first week it was, ‘Yikes, this isn’t going to work,’ ” said Weekly Standard editor-at-large Bill Kristol. “The calculus is: ‘We don’t want to be accused of doing him in, but we don’t want to go down with the ship either.’ ”

Trump’s bizarre appearance at CIA headquarters the day after assuming office seemed to be a major inflection point. “The inauguration speech was bad. People were rattled,” Kristol said. “But on Saturday morning, people were sort of saying, ‘Well, maybe that was the last gasp of the campaign. He’s going to the CIA this afternoon, and he’s going to make up with the intelligence community.’ But then he goes and spends 15 minutes screaming about crowd size and attacking reporters. For insiders in Washington, that CIA speech was very big.” Not incidentally, that speech may have further alienated the intelligence community, which now seems to have little reluctance to leak information to the press.

When I saw McCain two days after the CIA episode, it was one of the first things he brought up: “I mean, most observers, whether they’re supporters or opponents, believe he should have gone and praised the CIA. Instead, he wandered off into areas that are just not appropriate.”

Like Kristol, McCain thinks it will be easier to oppose Trump as his poll numbers go down. “One thing politicians look at are ratings, and his ratings are going to continue to decline,” he said. “That means members of Congress will be more likely to resist things they do not agree with rather than roll over.”

Already, a handful of other Republican senators — Graham, Roy Blunt, Bob Corker — are calling for Flynn to testify in Senate investigations on administration communications with Russia. (House Republicans remain much more circumspect.) Whether they persist in their pursuit of the truth, whatever it may be, and whether they can bring enough pressure to bear on congressional leadership to impanel an independent investigation, is undoubtedly the biggest test of the congressional check on executive power.

Proving that a foreign government helped install Trump as president would be a ­history-making feat — not to mention possibly lead to impeachment proceedings. So it is by no means McCain’s stated goal. “We’re clearly not there yet,” he told me.

“McCain is a savvy political operator,” a former adviser said. “He sees a critical mass building demanding investigations. He weighs in at the decisive moment to turn it to calls for a select committee, and ultimately he’ll be the person that tips it to calls for an independent-counsel investigation.” If that happens, who knows what will be found? Suspicions are both dire and plausible. It was, after all, an independent counsel looking into Whitewater that led to the Monica Lewinsky scandal. “If it’s found that there was collusion between senior officials in the Trump campaign and the Russian Federation, is that a criminal act? It puts us in uncharted waters,” said the adviser.

McCain has been tracking the Russia issue since shortly before Thanksgiving, when he ran into Sir Andrew Wood, a former British ambassador to Moscow, at the Halifax Security Forum, a foreign-policy conference. Wood tipped McCain off about the now-infamous dossier that claimed Putin had compiled embarrassing information on Trump that could be used for blackmail, as well as allegations that the Trump campaign coordinated with Kremlin officials. “I didn’t know what to make of it,” said McCain, “but everyone knows the Russians do use women and sex when people go to Russia. It’s an old KGB honeypot.”

When McCain returned to Washington, he received a copy of the dossier. The next day, he delivered the documents to FBI director James Comey. “I said, ‘It’s very important. You’re the person I want to give this to,’ ” McCain recalled. Comey gave McCain the impression he’d already been looking into it.

Since then, the drumbeat of news on the subject has gotten faster. On January 5, McCain held a widely attended hearing on Russian cyberoperations in which the then-director of national intelligence, James Clapper, testified that Russia’s pro-Trump strategy included “hacking … classical propaganda, disinformation, fake news.” On February 8, McCain attached his name to a bipartisan bill that would require Trump to get Congress’s approval to lift Russian sanctions. On February 10, CNN reported that U.S. intelligence agencies had confirmed several pieces of information in the dossier. More damning, U.S. intelligence also found — and leaked — that Flynn had discussed sanctions with Russia’s ambassador and later lied about it to Pence. The cover-up led many to suspect Flynn had undermined the Obama administration by communicating to Russia that the soon-to-be-installed Trump administration would come to a more favorable decision on the sanctions.

“I liked Flynn,” said McCain. “But obviously this is an example of the dysfunction.” Now, he said, there are questions that need to be answered: “When did Flynn know about anything to do with Russian interference? Why was there a gap of X number of days between the president being told and no action taken? What is the extent of the relationship between Flynn and the Russians?”

I asked McCain why most of his fellow Republicans aren’t speaking up about Russia’s election interference and Trump’s potential Russian ties. “I frankly don’t know,” he said. “It’s not a chapter of Profiles in Courage.”

McCain’s call for an independent commission will only get louder. While there are numerous Senate investigations in motion or being called for, the only way to coordinate efforts and see the big picture is to impanel a select committee. McConnell fears a select committee would derail the GOP agenda. But McCain continues to push. “After 9/11, Joe Lieberman and I proposed a select commission. It took more than a year before they finally appointed it, so I’m not giving up,” McCain said. “We’re going on offense on Russia,” agreed Graham, who, as a member of the Judiciary Committee, is calling for oversight of the FBI’s investigation into Trump’s ties to Russia.

In the meantime, the world keeps spinning, and McCain worries about America’s place in it. “The national-security aspect isn’t functioning,” he said. “Nobody knows who’s making the decisions. The Iranians are testing. The Russians are testing. They’re testing this administration. Who is making the decisions when we don’t have a national-security adviser?” On February 16, McCain traveled to Germany to shore up our European alliances that have been strained by Trump’s close relationship with Putin. McCain compares Trump-Putin to Stalin’s nonaggression pact with Hitler, in which the two dictators tried to divvy up Europe between them — which worked until Hitler decided to launch an attack on Soviet positions anyway. “Some have likened it to the Molotov-Ribbentrop spheres of influence, which said you have Eastern Europe and we have this. That doesn’t work with dictators,” said McCain. “Putin is a KGB colonel who is bent on restoring the Russian empire.”

McCain takes Putin’s global bullying personally. He points at a picture of a Russian opposition politician he keeps next to his desk. “This here is Boris Nemtsov,” he said. The physicist turned liberal politician was one of Putin’s fiercest critics and had become McCain’s friend. They last saw each other two years ago. “He sat on that seat there, and I said, ‘Boris, I don’t think you should go back because they’ll try and kill you.’ And he said, ‘I have to go back. I love my country.’ ” Upon his return, Nemtsov was shot four times from behind while crossing a bridge near Red Square. “He was murdered in the shadow of the Kremlin,” McCain said.

Two days after Flynn resigned, I visited McCain again at his office. He said Flynn’s ouster had caused the momentum to shift somewhat in his direction, but he was still grouchy that more Republicans weren’t onboard. An hour before we met, McConnell had once again told McCain that he wouldn’t approve a select committee. Since Congress remains reluctant to hold Trump accountable, McCain said it’s going to be journalists’ responsibility to investigate and put pressure on Congress. What will move the needle, he thinks, is “what’s in the press,” McCain said. “There’s just too many people out there who have this information. How did this Flynn thing happen?”

Of course, relying on the press also means relying on those who leak information to the press — a position that puts McCain once again at odds with the president, who has vowed to seek out and punish “lowlife leakers.” McCain acknowledged that leaks have the potential to do damage to national security. But he made a surprisingly impassioned case for them in an era when truth is hard to come by. “In democracies, information should be provided to the American people,” McCain said. “How else are the American people going to be informed?”

*This article appears in the February 20, 2017, issue of New York Magazine.