The veteran Arizona senator and 2008 Republican presidential nominee has taken an unusual role as the new president’s highest-profile Republican critic, his pointed pushback keeping stride with the dizzying pace of controversies Trump has set in his first two weeks.

WASHINGTON — It became a mantra for John McCain in the months around Donald Trump’s improbable electoral win: “I’m not talking about Trump. I’m not talking about Trump. I’m not talking about Trump,” he chanted to inquiring reporters in December.

McCain has publicly challenged Trump on refugees and immigration — saying the action may do more to recruit terrorists than beef up national security — as well as on the issues of torture, Russia, and trade. Trump has shot back, accusing McCain of “looking to start World War III.”


McCain’s willingness to so aggressively challenge Trump contrasts with many of his House and Senate colleagues and serves as a warning that Trump, his agenda, and his provocative ways may face increasing obstacles. It also highlights a danger of Trump’s scorched-earth, anti-establishment attacks.

Trump openly mocked McCain during his presidential campaign for being a Vietnam POW, saying “I like people who weren’t captured.’’ It was a highly personal attack that stunned the Republican Party, whose leaders rushed to McCain’s defense and called him a war hero.

Now McCain is needling Trump as the new president appears to hit a few early potholes running the executive branch. On Thursday, McCain — who occupies the powerful post of Armed Services Committee chairman — contacted Australia’s ambassador to smooth over the diplomatic dustup Trump created during a contentious call with the country’s prime minister. McCain followed that with a press release that implied he felt the need to mop up after the president.

Despite the tensions, McCain, who is 80 and was just installed by Arizona voters to another term, bristled in a Senate hallway conversation with reporters at the notion he’s playing the role of opponent in chief to the commander in chief.


“Whether it be Ronald Reagan, when I said we shouldn’t send Marines to Lebanon; whether it be George W. Bush, when I said you’ve got to fire [Defense Secretary Donald] Rumsfeld because we’re losing the war in Iraq — I have always done what I think is best,” said McCain. “But to portray it — I know it’s very convenient for the media — as some kind of nemesis. I’m not,” he said.

It is true McCain’s opposition is rooted in rhetoric, not legislative action. If he is emerging as the conscience of his party, the role is thus far limited to a moral argument. McCain pointed out that he has supported many of Trump’s Cabinet nominees and helped ensure quick committee action on a waiver to allow retired General James Mattis to serve as defense secretary despite not being out of the military for seven years, as required.

He said he is working closely with Mattis, White House national security adviser Michael Flynn, and Homeland Security chief John F. Kelly — and described all three men as close friends.

McCain and Trump see eye-to-eye on military spending, too.

“I’ve supported him strongly on rebuilding the military and I’m very much in favor of that,” McCain added.

Friends say McCain, in his criticism, is merely displaying his usual independence.


“I just think he’s being John McCain,” said close ally Lindsey Graham, a Republican senator from South Carolina with whom McCain issued a harsh statement blasting Trump’s ban on travelers from seven countries.

First elected to Congress in 1982 and the Senate in 1986, the former naval aviator has under gone several political metamorphoses.

In 2000, his bid for the GOP presidential nomination — during which he rode a bus dubbed the “Straight Talk Express” — attracted centrist support from both the right and the left and helped solidify his reputation as a forthright maverick, willing to buck his party when principle dictated.

His second run at the presidency in 2008 saw him stake out more conservative positions, and the happy warrior of 2000 seemed crankier. His selection of Sarah Palin, then the governor of Alaska, as his running mate turned off many of his independent supporters even as she energized conservatives.

Today, some Trump skeptics privately chafe at praise of McCain’s pushback on Trump, grumbling that he helped pave the way for the real estate mogul’s rise by elevating Palin, whose selection invigorated the far-right wing of the Republican Party and ultimately the Tea Party movement.

Since 2008, two tough Senate primaries in 2010 and 2016 caused McCain to move further right, and some say he never truly returned to his old bipartisan self.

One former senior level Capitol Hill staffer recalled how, in 2010, aides for Graham, then-Senator Joe Lieberman, and Senator John Kerry of Massachusetts were confident that McCain would back their bosses’ climate change legislation as soon as he beat his primary opponent that year. They were so confident that they printed up gray T-shirts with the slogan “Operation Sidney,” a reference to McCain’s middle name.


The confidence was based on conversations the three senators had had with their friend and colleague, the former aide said.

But McCain did not end up backing the legislation. It fell apart.

While he may be Trump’s most frequent critic, McCain isn’t the only Republican standing up to Trump. McCain’s close friend Graham has taken his shots, too, including accusing Trump of undermining “confidence in our democracy” with claims of widespread illegal voting.

Several others have criticized the immigration order, in varying degrees. Senators Susan Collins of Maine and Lisa Murkowski of Alaska put Trump’s pick to lead the Education Department, Betsy DeVos, at risk of failing confirmation by refusing to vote for her.

But McCain has nonetheless become the most prominent and persistent Trump critic at a time when most congressional Republicans seem intent on putting up a united front on behalf of the new president.

McCain is showing flashes of his trademark humor when it comes to Trump, too. Moments after fuming about not being Trump’s nemesis, he joked to reporters that watching the president’s prime-time Supreme Court nomination announcement made him think he was watching “The Apprentice.”

The day he did cleanup duty with the Australians, a reporter asked McCain whether he was worried about how the new administration was handling foreign policy.


“Oh no,” McCain replied, his voice heavy with sarcasm.

“I don’t care about that,” McCain said with a smile, when asked about having the president lash out at him on Twitter after he and Graham criticized Trump’s executive order on immigration. He added, laughing: “I’ve just joined a large group of people.”

But mostly McCain is taking the new president head on, at maximum volume.

When Trump issued his controversial immigration order, McCain blasted out a press release ahead of Trump’s first call with President Vladimir Putin of Russia to warn that the president better not lift sanctions against the country run by “a murderer and a thug.”

McCain has criticized Trump’s position on the North American Free Trade Agreement, castigated his nominee to lead the White House budget office, and called one proposal floated by the White House on how it can force Mexico to pay for a wall “insane.”

And that isn’t an exhaustive list.

“It is what he would do if Hillary Clinton had been elected,” said Mark Salter, a former senior adviser to McCain.

Salter said the senator is “doing what he thinks is in the best interest of national security,” speaking out forcefully and trying to mitigate what he sees as damaging policy moves, as he did with previous presidents of both parties.

“If Trump’s the kind of guy who takes it personally, too bad,” Salter added, noting that other presidents didn’t. “Grow up.”

Victoria McGrane can be reached at victoria.mcgrane@globe.com.Follow her on Twitter @vgmac.