A couple of weeks before he was ousted as deputy assistant to President Donald Trump, Sebastian Gorka gave an explosive two-and-a-half-hour speech to the US Army’s special operations school, which an officer who was present characterized as a “tirade” about the war in Afghanistan, Sharia law, radical Islamic terrorism, and the Trump administration’s aggressive policies to counter and “defeat it all.”

It was “classic Gorka,” said another US Army special operations officer.

BuzzFeed News learned about the speech, which was classified, through documents obtained in response to a Freedom of Information Act request.

Gorka delivered the Aug. 9 lecture, titled “Transnational Terrorism/Insurgent Ideology,” via secure video teleconference from the White House to students at the US Army’s elite Special Operations Center of Excellence, in Fort Bragg.

Special operations command declined to disclose specific details about Gorka’s talk because, the emails say, it was classified as secret. A spokesperson for the Army’s Special Operations Center of Excellence would only say that Gorka spoke about “extremism in religion.”

A former special operations instructor said Gorka has lectured students at the school at least eight times sine 2012. He said the "student critiques" of Gorka's remarks were brutal.

"His first lecture was very informative, very professional, well articulated and had relevant content," said the former instructor, who requested anonymity in order to speak candidly about Gorka. "The problem is every lecture thereafter was a complete duplicate. Try to imagine the content he was speaking about to an audience of 25 to 30 special forces warrant officers, some with seven or eight trips to named ops. Operator versus educator quarrels ensued and [Gorka] would not concede to my guys who had spend months embedded in the culture. He could not accept it."

The biography posted on Gorka’s website says he is an “internationally recognized authority on issues of national security, irregular warfare, terrorism and democratization.” But his credentials and knowledge about terrorism have been challenged by the national security and intelligence community. In an interview with CNN, Gorka's PhD adviser said he “would not call him an expert in terrorism.”

Gorka, who before Trump’s election was a contributor to Breitbart News, had been a controversial presence since he joined the Trump administration.

A day before his lecture, the British-born anti-Islamic pundit said during an MSNBC interview he believed that a bomb that exploded at a Minneapolis mosque was a “fake hate crime.” At Donald Trump’s inauguration, Gorka wore the uniform and medal of the Historical Vitézi Rend, a far right Hungarian group that had ties to the Nazi Party. Gorka has vehemently denied he belonged to the group or ever held anti-Semitic beliefs.

According to 16 pages of emails between Gorka and officials at special operations command, whose names are redacted, military officials emailed him at the White House in May and invited him to speak at the Special Forces Warrant Officer Institute during the week of Aug. 7, when students would be studying unconventional warfare. Gorka's fiery rhetoric about Islam had by that time already cost him a lucrative FBI contract.

Administrators at the institute proposed having Gorka deliver his speech a second time, at the 400-seat Kennedy Hall auditorium at the US Army John F. Kennedy Special Warfare Center, as part of the facility’s “distinguished lecture series.”

But Gorka’s appearance at the larger venue was abruptly canceled the day it was to take place. The spokesperson chalked it up to a misunderstanding by special operations personnel.

Gorka “never said he could do the distinguished lecture series,” the spokesperson said. “Someone believed he said yes and ran with it.”

Two special operations officers said they were told by their superiors that Marine General John Kelly, the White House chief of staff, prohibited Gorka from speaking in a public setting while he was still employed as the deputy assistant to the president. Not long after his classified talk, Gorka took some time off. While he was on vacation, Kelly told Gorka his security clearance had been revoked.

Gorka could not be reached for comment, and a spokesperson for Kelly did not respond to requests for comment.

The Daily Beast first reported that the second talk had been canceled and noted that officials at the Special Operations Center of Excellence school considered rescheduling it. But the spokesperson said the school has no plans to have Gorka return to lecture about religious extremism because “he is no longer working in the area that would give him a reason to talk to our students.”