Ex-national security adviser John Bolton on Wednesday ripped President Trump’s aborted plan to invite the Taliban to Camp David, saying the move sent a “terrible signal” and was “disrespectful” to the victims of 9/11 because the Taliban had harbored al Qaeda.

Bolton, speaking at a private luncheon, also said that negotiations with North Korea and Iran were “doomed to failure” on the president’s watch, two people who were there told Politico.

All the North Koreans and Iranians want is relief from sanctions to support their economies, Bolton told guests at the event hosted by the Gatestone Institute, a conservative think tank.

“He ripped Trump, without using his name, several times,” said one attendee.

Bolton also said more than once that Trump’s failure to respond to the Iranian attack on an American drone earlier this summer set the stage for the Islamic Republic’s aggression in recent months — including Saturday’s large-scale attack on the Saudi’s oil industry.

Bolton, a previous chairman of Gatestone, said that had the US retaliated for the drone shootdown, Iran might not have damaged the Saudi oil fields. Bolton’s comments came on the same day Trump named his successor, hostage negotiator Robert O’Brien.

After the attack on the US drone in June, Trump was prepared to launch a retaliatory strike against Iran — but later announced that he had changed his mind. Bolton said the response had gone through the full process and everybody in the White House had agreed on the retaliatory strike.

But “a high authority, at the very last minute,” without consulting anyone, decided not to do it, Bolton said.

Bolton spoke to roughly 60 Gatestone donors at Le Bernardin in Manhattan.