Gary Cohn, Trump's top economic adviser, is leaving the White House.

Before joining the Trump administration, Cohn was the second-in-command at Goldman Sachs.

"Gary Cohn deserves credit for serving his country in a first class way," Goldman Sachs CEO Lloyd Blankfein tweeted Tuesday.

Goldman Sachs CEO Lloyd Blankfein thanked his former deputy, Gary Cohn, following the news of Cohn's departure from the White House on Tuesday.

"Gary Cohn deserves credit for serving his country in a first class way," Blankfein tweeted. "I’m sure I join many others who are disappointed to see him leave."

Cohn was the second-in-command at the investment bank prior to leaving for the Trump administration, in which he served as director of the National Economic Council and the president's top economic adviser.

Starting as a commodities trader, Cohn worked his way up through the ranks at Goldman Sachs and spent a total of 26 years at the firm.

The White House tenure was tumultuous for Cohn, and rumors of his departure swirled for almost a year. The former Goldman executive admitted that he almost left the White House after Trump's response to the racial violence in Charlottesville, Virginia.

Throughout Cohn's tenure, Blankfein was supportive of his former deputy. When rumors ran rampant that Trump was considering Cohn to be Janet Yellen's replacement as chair of the Federal Reserve, the Goldman CEO said Cohn would do a "great job."