Sebastian Gorka, one of the most controversial figures in the controversy-laden Trump administration, left his job at the White House on Friday. Though he apparently issued a resignation letter, the White House is insisting that he did not resign — implying that he was fired.

"Sebastian Gorka did not resign, but I can confirm he no longer works at the White House,” the White House said in an official statement to press.

Gorka was serving as a deputy assistant to President Trump, focusing on national security and terrorism — though it wasn’t clear what his actual duties were, aside from defending the administration’s policies on TV. He was closely aligned with departed senior strategist Steve Bannon, and he seemed to link his departure with Bannon’s in his exit letter.

"The individuals who most embodied and represented the policies that will ‘Make America Great Again,’ have been internally countered, systematically removed, or undermined in recent months," Gorka wrote, in an excerpt published by the Federalist. "The best and most effective way I can support you, Mr. President, is from outside the People’s House.”

Gorka had long been a problem for Trump. His deep ties to Hungarian far-right groups, his questionable scholarly credentials on terrorism, and his hostile approach to Islam made him more of a liability than an asset.

But Gorka’s ouster from the White House isn’t just a story about one man. It’s a story about an entire faction within the Trump administration — the self-described “nationalists” associated with Bannon — and how their influence has been weakened since Inauguration Day.

Because the Bannon wing’s ideology is so opposed to the mainstream consensus in US politics, it tends not to have a lot of people with government experience and conventional qualifications. Instead, its ranks are made up disproportionately of people like Gorka, with sketchy pasts and little knowledge about how to make change.

That puts them in a weak position to run a government — especially when they’re competing against some more traditionally qualified, and more experienced, opponents inside the White House. Initial reports suggest that Gorka was pushed out by Chief of Staff John Kelly, the retired four-star Marine general who was also partly responsible for Bannon’s departure earlier this month.

That Gorka is leaving so closely after Bannon is no accident. The Bannon-led faction of “nationalist” outsiders has been thoroughly outmaneuvered by the so-called “globalists” they so despise.

Gorka’s problems: his past and his qualifications

Gorka was always a questionable choice for such a high office.

Gorka’s full name is Sebastian L. v. Gorka — a name that sounds normal (if a touch pretentious) to Americans but that raised eyebrows in Hungary, where Gorka’s parents are from and where he lived from 1992 to 2007.

That’s because the lowercase v denotes membership in a group called the Vitézi Rend (Order of Vitéz), a far-right nationalist group in Hungary originally founded by fascist dictator Miklós Horthy.

While experts on Hungary disagree on just how much influence the group’s anti-Semitic, racist origins have on the contemporary Vitéz, there’s a universal belief that it is on the right-wing and nationalist end of Hungary’s political spectrum. And reporting on Gorka’s links with the Vitéz and other far-right groups, most notably by the Forward’s Lili Bayer, has revealed a number of troubling nuggets:

Gorka appeared on Hungarian television endorsing the Hungarian Guard, a militia that the European Court of Justice found to be “essentially racist.”

Gorka penned several op-eds for Magyar Demokrata, a paper notable for publishing virulently anti-Semitic material.

Gorka swore an oath of allegiance to the Vitézi Rend, according to its leaders, in which he promised that he had “never betrayed my Hungarianness” and would follow orders from the group’s leaders “for the rest of my life.”

In 2002, Gorka applied for a security clearance to work in Hungary’s Ministry of Defense — and failed the background check. His claims about his past, including work for the British intelligence agency MI6, did not check out.

“Sebastian Gorka is not a Nazi or a security threat because he is some sort of secret British agent,” a member of Hungary’s counterintelligence service told BuzzFeed’s Mitch Prothero. “Gorka is, how do you say in English — a peddler of snake oil.”

Gorka’s post-2002 qualifications were also thin. His PhD, awarded by Corvinus University in Hungary, has been roundly criticized by American academics for failing to uphold basic standards of citation and intellectual rigor.

“I am confident that [Gorka’s dissertation] would not earn him a doctorate at any reputable academic department in the United States,” Dan Nexon, a professor of international relations at Georgetown University, wrote at the blog Lawyers, Guns, and Money. “Indeed, it would be unacceptable as an undergraduate thesis.”

Since getting his PhD, Gorka has published little in the way of scholarly work on terrorism, his purported field of expertise, and has a dim reputation among counterterrorism professionals. His popular commentary insisted on a tight link between Islam as a religion and jihadism, which most experts found untenable. In a March NPR interview, for example, he refused to say whether the president believed that Islam was a religion (the implication being that Trump might consider it a violent ideology instead).

The buzz from inside the Trump White House suggests that Gorka was mostly serving as a public face for Trump team on cable news, and that he stuck around largely because of Bannon’s support and the president’s appreciation of his willingness to go to the mat for Trump on TV.

“This guy has always been a big mystery to me," one White House official told the Washington Examiner earlier this year. His responsibilities, the official said, were appearing on television, “giving White House tours and peeling out in his Mustang.”

Given Gorka’s limited contributions and lightning rod character, it’s easy to see why someone like Chief of Staff Kelly — who is trying to build a more disciplined White House — would want Gorka gone. And without Bannon’s support, Gorka simply did not have a lot of juice.

Gorka’s problems are the Bannon wing’s problems

While many of Gorka’s problems are specific to him, they also tell a broader story about the Trump White House.

Gorka got into the administration in the first place because of his connection to Bannon. Gorka had been the national security editor for Bannon’s Breitbart News website since 2014. He and Bannon share a similar ideological belief that the war against Islamic extremism is a defining, civilizational conflict. Both view Islam, or at least key parts of Islamic theology, as the enemy.

In the White House, Gorka was initially supposed to work on the Strategic Initiatives Group — a Bannon-masterminded alternative to the National Security Council. And Gorka became perhaps the most prominent administration official publicly defending Trump’s controversial travel ban, a Bannon-crafted policy, in part because he seemed to actually believe the ideas that justified it.

But over time, Bannon and his allies began to lose influence in the White House. On foreign policy, the administration has adopted an essentially conventional stance on issues ranging from NATO to Syria to Afghanistan — the last of which, Trump’s decision to send more US troops to Afghanistan, Gorka specifically cited in his resignation letter.

This was in large part because the self-described nationalists proved to be astonishingly bad at actually pushing their agenda. The travel ban sparked massive protests and has been tied up in court due to the sloppy and rushed way Bannon and another ally, Stephen Miller, wrote it. Bannon tried to convince Trump to pull back from the Afghanistan War, but National Security Adviser H.R. McMaster convinced the president to do the opposite.

The core issue here is incompetence and underqualification. Bannon was great at running a hard-right, provocative media outlet, no question. But being good at generating outrage online and being good at making policy are two very different skills. His allies tended to be people like Gorka and now-disgraced former National Security Adviser Michael Flynn, fringe figures who are poorly regarded in their fields, because there simply weren’t a lot of people with real experience or traditional qualifications who agreed with his worldview.

Meanwhile, the more mainstream officials in the Trump administration — folks like Chief of Staff Kelly, Secretary of Defense Jim Mattis, National Economic Council Director Gary Cohn, and McMaster — are all ascendant. Kelly, Mattis, and McMaster were high-level generals, who know how the government works from decades of experience. Cohn was the president of Goldman Sachs for 11 years, so at least he has loads of experience in getting his way in a large organization.

When Trump pulled in people with more conventional qualifications, he ended up getting people with more conventional views — and more talent at bureaucratic infighting. Running a government is hard — especially when you don’t know how to do it, and even more so when you’re competing against people who do.

Bannon lost and ultimately left the White House, and allies like Gorka are leaving right behind him.