Beneath the surface of the controversy over Russia’s efforts to help Donald Trump become president is a dramatic reconfiguration of opinion on foreign policy.

Many Republicans who had long been critical of Vladimir Putin’s despotic rule are adjusting their positions to accord with Trump’s more sympathetic views. Others are hanging back, fearful of picking a fight with their party’s incoming president or undermining the legitimacy of his election.

At the same time, Putin’s fiercest Republican critics, including leading neoconservatives, find themselves allied with Hillary Clinton’s supporters. They are calling out the Kremlin’s interference with the election and demanding a full accounting of what happened. Sens. John McCain and Lindsey O. Graham have been among the most outspoken.

While some on the left worry about starting a new Cold War, there has been a broad toughening of liberal and Democratic opinion toward Russia. This shift owes in part to outrage over Putin’s efforts to sabotage Clinton, but the roots of the mistrust of Putin can be traced back several years.

Putin’s hostility toward Clinton is widely seen as a response to her criticism of the 2011 Russian elections, a point she underscored herself last week. Mass protests broke out against what the opposition saw as Putin’s vote rigging. At the time, he blamed Clinton and the American government for the uprising.

(Sarah Parnass/The Washington Post)

Putin fumed that Clinton had said the elections “were dishonest and unfair” and that she had given “a signal” to demonstrators who, he claimed, enjoyed “the support of the U.S. State Department.”

In words that now carry an ironic ring, Putin added: “We need to safeguard ourselves from this interference in our internal affairs.”

According to the CIA, Russia struck back hard at Clinton through the hacks and was determined to help elect Trump who, for his part, has issued one encomium after another to Putin.

More embarrassing for Republicans, Russia also seemed determined to help GOP candidates for the House of Representatives and to defeat Democrats. According to the New York Times, Russian hacking sought to tilt House races in states that included Pennsylvania, New Hampshire, Ohio, Illinois, New Mexico and North Carolina. Republicans will not be eager to explore why Putin might have wanted to help their party as a whole. This only deepens their problems in dealing with the hacking story.

While McCain and Graham were vociferous in denouncing Russia, other Republicans are clearly frustrated that a story with great potential for blowback against the party is getting so much attention. Rep. Peter T. King (R-N.Y.) charged that “certain elements of the media, certain elements of the intelligence community and certain politicians are really doing the work of the Russians” by creating uncertainty over the election.

Republicans are also split over how to grapple with the issue going forward. Senate Majority Leader Mitch McConnell was slow to respond to The Post’s report of CIA conclusions about Russian interference. He eventually endorsed a congressional investigation but said it should be conducted by the usually secretive Intelligence Committee. McCain, on the other hand, called for a select committee that would raise the investigation’s profile. McCain’s approach is endorsed by many Democrats.

And Trump’s nomination of Rex Tillerson as secretary of state — the ExxonMobil chief executive received an award of friendship from Putin — is dividing Republicans along multiple lines. Trump’s supporters want to back his choice. Some in the party are fearful of Tillerson’s ties to Russia. And many Republican establishment figures not particularly close to Trump (including some with ExxonMobil ties) are praising Tillerson as a moderate internationalist.

One political leader who has noticed the GOP’s newfound camaraderie with Putin is President Obama. In a pointed comment during an NPR interview, Obama noted that “a big chunk of the Republican Party, which prided itself during the Reagan era and for decades that followed as being the bulwark against Russian influence, now suddenly is embracing him.”

At a news conference on Friday, Obama said he found it “a little curious that everybody is suddenly acting surprised that this looked like it was disadvantaging Hillary Clinton. . . . This was an obsession that dominated the news.”

During the Republican primaries, Jeb Bush referred to Trump as the “chaos candidate,” and Trump is already sowing chaos in his party over Russia. Many Republicans are horrified by the idea that the GOP will come to be seen as the pro-Putin party. Trump seems to have no such qualms, and he is forcing Republicans to take sides on a Russian autocrat who is no friend of the United States.

Read more from E.J. Dionne’s archive, follow him on Twitter or subscribe to his updates on Facebook.