Controversial Trump adviser Sebastian Gorka leaves White House post "I can confirm he no longer works at the White House,” a WH official said.

 -- President Donald Trump's controversial adviser Sebastian Gorka has left his post as deputy assistant, a White House official confirmed to ABC News.

"I can confirm he no longer works at the White House,” the official said.

Gorka wrote in a lengthy letter obtained by The Federalist that he had resigned his post. The letter shows his frustration with national security adviser H.R. McMaster's leadership and his moves to push out some of the close allies of former Chief Strategist Steve Bannon, including Rich Higgins, Derek Harvey and Ezra Cohen-Watnick.

[G]iven recent events, it is clear to me that forces that do not support the MAGA promise are -- for now -- ascendant within the White House,” Gorka wrote in part, according to The Federalist. “As a result, the best and most effective way I can support you, Mr. President, is from outside the People’s House.”

Gorka attracted an extraordinary amount of scrutiny during his time in the White House for his alleged tie to a far-right Hungarian nationalist group and his questionable national security resume.

Most recently, he courted controversy with an interview just a week prior to the Charlottesville, Virginia, violence earlier this month in which he criticized the media for focusing too much on white supremacists.

Gorka came to the White House from Breitbart, where he had cultivated a reputation for writing anti-Islamist scribes.

In its article Friday night about Gorka's departure, Breitbart said it is "currently in negotiations with Dr. Gorka regarding his support for the website, as well as collaboration on a joint venture that would embody a Jacksonian national security vision."