WASHINGTON – President Donald Trump said his former top national security adviser was "way out of line" with his administration's foreign policy goals and repeatedly slammed the veteran diplomat for advocating for U.S. military engagement in Iraq.

In his first remarks on John Bolton since his dismissal, Trump said the two "maybe" split on good terms. Bolton, Trump's third national security adviser in as many years, had disputed Trump's characterization Tuesday that he had been fired.

"I hope we left on good stead, but maybe we haven’t," Trump told reporters gathered in the Oval Office. "John wasn’t in line with what we were doing."

Trump blasted Bolton for making "some very big mistakes," including his role as an advocate for the invasion of Iraq in 2003 – which happened years before Trump brought him on board at the White House. Trump also blasted Bolton for suggesting that the U.S. was seeking to embrace the "Libyan model" for North Korea.

Breakup:Why the Trump-Bolton split was inevitable. They clashed

Analysts have noted that North Korean leader Kim Jong Un has been fearful to give up his nuclear weapons program precisely because he worries about what happened to former Libyan leader Muammar Gaddafi, who was turned out of power and assassinated in 2011.

"That's a question of being not smart, to say something like that," Trump said.

The controversy over Bolton's comments on North Korea took place months ago.

Trump's decision to fire Bolton came amid more recent internal tensions at the White House over negotiations with the Taliban to end the war in Afghanistan. Bolton opposed a planned secret meeting with the Taliban at Camp David that the president scuttled over the weekend.

Trump also said Bolton was "way out of line" on how to deal with political unrest in Venezuela. Bolton and Trump have both called for a peaceful transition of power from Venezuelan President Nicolas Maduro to opposition leader Juan Guaido. Trump has ramped up economic pressure on Venezuela in recent weeks.

Trump said he is considering at least five candidates for the job and said he will name a replacement next week. Sen. Lindsey Graham, R-S.C., a Trump ally, said the president told him he is considering at least three candidates: Keith Kellogg, a retired general who temporarily filled the role in 2017; Brian Hook, a senior State Department official and Rick Waddell, a former deputy national security adviser.

Graham made the remarks in an interview with Fox News.