Economic adviser Gary Cohn, seen above in April 2017, was considered one of the more stable parts of the White House administration. He announced his resignation Tuesday. Washington Post photo by Jabin Botsford

WASHINGTON – Gary Cohn, the White House's top economic adviser, announced Tuesday he was leaving the administration amid a major internal clash over President Donald Trump's sharp and sudden pivot toward protectionist trade policies.

Cohn, the former president of Goldman Sachs who had been an interlocutor between the Trump administration and the business community, still plans to stay in his job for several weeks, a person briefed on his plans said.

He plans to continue to push back on Trump's planned tariffs on steel and aluminum imports, which have threatened to touch off a global trade war, said the person who spoke on condition of anonymity to discuss Cohn's plans.

But his departure as National Economic Council director leaves the White House without a financial heavyweight that business executives and foreign leaders believed had served as a counter to Trump's protectionist impulses and as a moderating force in other areas.

Cohn's resignation announcement is the latest jolt to a White House that has been especially tumultuous in recent weeks and unable to retain its top talent. Last week, communications director Hope Hicks and deputy communications director Josh Raffel announced their resignations.

In February, staff secretary Rob Porter was forced out over domestic abuse allegations. And the year began with the departures of deputy national security adviser Dina Powell as well as Cohn's deputy on the National Economic Council, Jeremy Katz.

Taken together, the departures largely diminish the faction of free trade advocates who not only held center-right views on trade and other issues, but were seen as moderating forces inside a West Wing otherwise populated by more hardline conservatives.

"It has been an honor to serve my country and enact pro-growth economic policies to benefit the American people, in particular the passage of historic tax reform," Cohn said in a statement. "I am grateful to the President for giving me this opportunity and wish him and the Administration great success in the future."

Trump said in a statement, "Gary has been my chief economic advisor and did a superb job in driving our agenda, helping to deliver historic tax cuts and reforms and unleashing the American economy once again. He is a rare talent, and I thank him for his dedicated service to the American people."

In the past week, Trump has said he will impose tariffs that hit imports from Canada, Germany, Mexico, the United Kingdom, Turkey, South Korea, and a range of other countries, threatening to escalate the penalties if any nation dare to retaliate.

This came after Cohn spent months trying to steer Trump away from tariffs and trade wars, with Cohn eventually being outmaneuvered by Commerce Secretary Wilbur Ross, trade adviser Peter Navarro, and ultimately Trump himself.

Trump could cast a wide net in searching for a replacement, though he has told advisers that he wants to consider Larry Kudlow, a media personality and 2016 campaign adviser, according to several people briefed on Trump's discussions.

In many ways, Cohn's NEC was one of the most stable parts of the White House, avoiding the scandals and revolving-door image that the National Security Council and other offices endured. But Cohn and the president had an on-again, off-again relationship, with relations becoming chilly after Cohn criticized Trump's response to a white supremacist rally in Charlottesville, Virginia.

Cohn's departure rattled a number of business executives around the country, many of whom saw the Wall Street veteran as a free market capitalist who would speak out against those who wanted to pick fights with global trading partners.

"The protectionists are clearly running the show right now, the economic nationalists are," said Brian Gardner, managing director of Keefe, Bruyette & Woods. "If they replaced [Cohn] with another economic nationalist, then it really gets dicey for the markets and investors."

Kudlow has been largely supportive of Trump's economic agenda, but he has expressed concerns about Trump's moves on trade. He has in recent days encouraged Cohn to stay. Reached by phone on Tuesday, Kudlow declined to comment.

Cohn's departure was first reported by the New York Times and immediately confirmed by White House officials.

Cohn had first discussed with Trump the possibility of departing the White House in January, a person familiar with the conversation said, always having had the goal of staying in the Trump administration for around a year. He agreed to join Trump to economic meetings in Davos, Switzerland and then help with the State of the Union. An infrastructure plan Cohn had spent months trying to design was supposed to be the focus of the early part of this year but it was repeatedly sidelined, first for a debate about immigration policy and then by last month's mass shooting at a Florida high school.

It was Cohn and Treasury Secretary Steven Mnuchin who helped convince Trump to postpone ripping up trade agreements or imposing tariffs late last year to avoid enraging congressional Republicans during the tax debate.

"I was quite impressed with the job he did," said Steve Moore, who was an economic adviser to Trump during the 2016 campaign. "I don't always admit I was wrong, but I was wrong about Gary. He was very valuable to Trump. He was a steadying hand."

Cohn was not expected to stay long into 2018, but he did outlast the first wave of departures in January and February. The stock market soared in 2017 in part because of global growth but also because of investor enthusiasm over Trump's deregulatory agenda and tax cut focus, items that Cohn helped design.

But people close to Cohn said he found the pivot towards protectionism this year infuriating, and he wouldn't force himself to go out in public and defend it. Cohn did not attend Trump's news conference on Tuesday, something he typically does.

"He was a voice of reason and sanity on economic policy, so I think a lot of people valued his presence and the grounding that he brought to the White House," said Lanhee Chen, a Republican policy expert and a fellow at Stanford University's Hoover Institution.

He made a last-ditch effort on Monday to schedule a meeting for Trump with companies that would be harmed by new steel and aluminum tariffs and the White House refused to schedule the meeting for the president.

At the center of the West Wing drama has been a president who aides say is not easily controlled and whose dark moods of late have manifested themselves in private fits of rage as well as policy gyrations.

Trump has chosen to manage his White House like he did his real estate empire as well as the casts of his hit reality television show, "The Apprentice" – by fostering chaos. At a Tuesday afternoon news conference, just two hours before Cohn's resignation was announced, Trump defended his management style.

"I like conflict," Trump said Tuesday. "I like having two people with different points of view, and I certainly have that. And then I make a decision. But I like watching it. I like seeing it. And I think it's the best way to go."

Trump went on to argue that his White House is a talent magnet, even though chief of staff John Kelly has struggled to recruit experienced candidates for top-level jobs in the administration.

"I read where, oh, gee, maybe people don't want to work for Trump," the president said. "Believe me, everybody wants to work in the White House. They all want a piece of that Oval Office. They want a piece of the West Wing. And not only in terms of, it looks great on their resume. It's just a great place to work. It's got tremendous energy. It's tough."

Trump on Tuesday morning previewed future firings. "I still have some people that I want to change [always seeking perfection]," he wrote in a tweet.

But asked at the news conference who he had in mind – and whether he was looking to fire Attorney General Jeff Sessions, with whom he has feuded bitterly for months – Trump would not say.

"I don't really want to talk about that," the president said. He added, "There will be people that change. They always change. Sometimes they want to go out and do something else. But they all want to be in the White House. So many people want to come in. I have a choice of anybody."

The Washington Post's Ashley Parker, Heather Long and Joshua Dawsey contributed to this report.