Donald Trump campaigned as an outsider who would upend years of Washington orthodoxy in matters of both war and peace — an approach that helped him assemble the unconventional coalition that ultimately won him the presidency.

But in recent days, the president has done an about-face and embraced many of the policy positions he once scorned as the trappings of a foolhardy establishment.

Trump voiced support for NATO, which he called “obsolete” during the campaign. He walked back his pledge to label China a currency manipulator and ­endorsed the Export-Import Bank, which he had opposed.

These and other recent flip-flops have soothed the nerves of many Republicans who worried he was looking to upend too much of the status quo. But they could also alienate some supporters, who see Washington co-opting yet another politician elected to reform the government.

On Thursday, White House press secretary Sean Spicer argued that it wasn’t Trump who had shifted.

(Peter Stevenson/The Washington Post)

“If you look at what’s happened, it’s those entities or individuals in some cases, or issues, evolving towards the president’s position,” Spicer said. “I think you look at the president’s position, where he wanted to see NATO in particular evolve to, and it’s moving exactly in the direction that he said it was in terms of its goals of increasing the amount of participation from other member countries; and two, it’s having a greater focus on terrorism.”

NATO has been moving toward greater burden-sharing for years and has long been involved in counterterrorism, particularly since the Sept. 11, 2001, attacks. Spicer also pointedly declined to explain why Trump changed his position on a slate of other issues that had remained essentially unchanged since he was a candidate.

The administration has slow-walked moves toward renegotiating the North American Free Trade Agreement, despite his railing against the deal as a candidate. And the Trump administration has approved aggressive, even hawkish stances overseas on issues such as Syria, the Islamic State and North Korea, regardless of Trump’s often noninterventionist stances during the campaign.

[The Daily 202: Here are eight flip-flops since Trump was inaugurated]

Among those heartened by the changes is a former critic Elliott Abrams, who was later considered for a post at the State Department but was rejected for a senior post in Trump’s State Department because he was considered too much of an “establishment Republican.”

“I would say this is looking more now like a more conventional Republican administration,” said Abrams, who served as a foreign policy adviser in the Reagan and George W. Bush administrations. “To me, that’s a very good thing.”

Trump’s opposition to the ­Export-Import Bank — a government agency that subsidizes U.S. exports — endeared him to movement conservatives who labeled it “corporate welfare” and “crony capitalism.” It fit well with a campaign message in which Trump railed against the “global elite” conspiring against the common man.

(Reuters)

But to the thrill of establishment Republicans, corporate leaders and some Democrats, Trump reversed course this week, solidifying a shift he first signaled in February.

“Instinctively, you would say, ‘Isn’t that a ridiculous thing?’ . . . But, actually, it’s a very good thing,” he told the Wall Street Journal in an interview this week. “It turns out that . . . lots of small companies are really helped!”

Almost immediately, the move drew praise from Sen. Lindsey O. Graham (R-S.C.), whose state gets an economic boost from the bank.

“Well done, Mr. President,” Graham said in a statement.

The thaw, especially among Republican hawks, seemed to begin in earnest last week when Trump, faced with his first major foreign policy test, sided with the use of military force in Syria. That decision — which contradicted Trump stances dating to 2013 — endeared him to members of Congress such as Graham and Sen. John McCain (R-Ariz.), who had criticized his isolationist campaign rhetoric.

[Three big ways Trump is starting to sound like Obama on the economy]

“I think it’s a product of the fact that he didn’t understand foreign affairs,” presidential historian Tim Naftali said of the president. “His business career didn’t afford him much information on foreign affairs. He’s learning on the job.”

On economic issues, some have speculated that Trump’s shift has been linked to the growing influence of a group of advisers led by his son-in-law, Jared Kushner, many of whom are political moderates and who came to the administration from Wall Street.

The rift between Kushner-backed aides such as National Economic Council Director Gary Cohn and Republican hard-liners in the administration — especially the president’s chief strategist, Stephen K. Bannon — has only grown in recent weeks, raising questions about whether Trump will abandon the economic populism that got him elected in favor of a more traditional platform influenced by Wall Street.

But Trump’s backers say that, from the beginning, the president assembled a Cabinet of military leaders, establishment Republicans and business leaders who would be at home in the Cabinets of more traditional Republicans. And he has pursued policies in other areas — on immigration, the budget, taxes, and rolling back the Affordable Care Act — that have left many conservatives content with the direction his administration is headed.

“The budget he’s put out is an incredible budget. He’s pushed hard to abolish Obamacare,” said Grover Norquist, president of Americans for Tax Reform. “The tax bill he put forward is Reaganite in all it’s forms, so I’m looking at a guy who did exactly what he said he was going to do on every big issue.

“Both on China and NATO, he rattled the cage and got movement in the direction that he wanted,” Norquist said, “and, at least as of now, NATO is behaving the way he wants it to and the Chinese might be more helpful in Korea.”

[President Trump, king of flip-flops (continued)]

One former Trump aide, who requested anonymity to speak candidly, said that the president is known to form initial opinions based on instinct but later to change his stance based on new information and the influence of his advisers.

“He has a general reaction to something, then after he does a lot more homework on the situation, he can change his view,” the former adviser said. “The reason most of these voters voted on him was less because of the core issues, it was more based on the Trump decision-making, the Trump judgment.”

Yet Trump promised his supporters — a coalition that included larger-than-expected numbers of non-college educated, working-class voters — that he would pursue populist policies that put the interests of American workers first. It remains to be seen whether these changes will be viewed as moving toward that goal.

John Weaver, a former presidential campaign aide to Ohio Gov. John Kasich (R), said that so far, the dissonance between Trump’s campaign pledges and his current positions haven’t touched on core promises, such as bringing back U.S. jobs or seeking to repeal the Affordable Care Act.

“The fact that he says one thing or another about NATO has no impact on their day-to-day lives,” Weaver said of Trump’s supporters.

And with Trump, allies and adversaries alike are never sure he won’t change his mind again.

“It represents ‘Trump is a New York City liberal’ returning back to form,” said Rick Wilson, a Republican strategist sharply critical of Trump. “People should not be surprised.”

But Trump, he added, “because he has a short attention span, could easily flop back.”

Correction: An earlier version of this article incorrectly described Elliott Abrams as a "'Never Trump' Republican.” Abrams wcritical of Trump during the campaign but did not belong to any organized effort against his candidacy. The story has been corrected.