Former White House deputy assistant Sebastian Gorka said Tuesday "the Republican Party thinks they won the election" — but Donald Trump actually did.

"The biggest problem we have isn't the Democrat Party," Gorka, who resigned last month, told the Los Angeles Times in an interview in Israel. "The biggest near-term obstacle to the president's agenda is the fact that the Republican Party thinks they won the election.

"They did not win the election," he added. "The president was only the Republican candidate by accident.

"He is the quintessential anti-establishment candidate, as anti-left-wing establishment as he is anti-right-wing establishment."

Gorka spoke with the Times after speaking at the International Institute for Counter-Terrorism's annual conference in Herzliya, Israel.

He was invited before leaving the White House.

"The president won for a reason," Gorka said. "The bumper sticker for that reason is 'MAGA' — 'Make America Great Again.'

"It was a very simple platform: Build the wall, fix the economy, defeat the jihadists."

But Trump's recent agenda has deviated from these objectives, leading Gorka to resign.

"In the last few months it became apparent to me, to Steve [Bannon, former White House chief strategist], to members of the original MAGA team, that people who had nothing to do with the 'Make America Great Again' agenda were rising in influence inside the building and were shutting out and boxing out people who had been identified as [the] heart and soul of the original platform.

"So Steve left," Gorka told the Times. Bannon was ousted a week before Gorka's resignation. "That was his decision.

"When I saw the text of the speech the president had been given to give on Afghanistan, that was the catalyst," he noted referring to a speech Trump gave the week before on the 16-year conflict.

"When I heard one of the most important national security speeches of the new presidency not make one mention of the phrase radical Islam or radical Islamic terrorism, I realized that I cannot effectively do my work as a government official when these are the constraints inside the building."