The former White House chief of staff John Kelly has backed the fired impeachment inquiry witness Alexander Vindman, launching a spirited defense of the former National Security Council official and criticizing the Trump administration across a range of issues.

Controversy rages over Trump interference in Roger Stone case – live updates Read more

Kelly, a retired four-star Marine Corps general, told an audience at Drew University in New Jersey on Wednesday evening that Vindman was simply following the training he had received as a soldier when he flagged his concerns about Donald Trump’s phone conversation with the Ukrainian president, Volodymyr Zelenskiy, last summer.

“He did exactly what we teach them to do from cradle to grave,” Kelly said. “He went and told his boss what he just heard.” Kelly’s comments were first reported in the Atlantic.

Vindman, a Ukraine policy specialist, complied with a congressional subpoena and spoke out about hearing Trump tie US military aid for Ukraine to an agreement by Zelinskiy to investigate Joe Biden, Kelly said.

Trump responded abrasively, tweeting: “He came in with a bang, went out with a whimper, but like so many X’s, he misses the action & just can’t keep his mouth shut, which he actually has a military and legal obligation to do.”

He added: “His incredible wife, Karen, who I have a lot of respect for, once pulled me aside & said strongly that John respects you greatly. When we are no longer here, he will only speak well of you.’ Wrong!”

In his address, Kelly spoke of Trump’s Ukrainian phone call.

“Through the Obama administration up until that phone call, the policy of the US was militarily to support Ukraine in their defensive fight against … the Russians. And so, when the president said that continued support would be based on X, that essentially changed. And that’s what that guy [Vindman] was most interested in.”

But when Vindman heard Trump tell his counterpart he wanted to see the Biden family investigated, he understood he was hearing “an illegal order”, Kelly said.

He said: “We teach them, ‘Don’t follow an illegal order. And if you’re ever given one, you’ll raise it to whoever gives it to you that this is an illegal order, and then tell your boss.”

The former chief of staff also criticized the president’s attacks on certain media outlets – which Trump has often accused of being “fake news” and sought to sideline or restrict access to the White House – saying he did not view the media as “the enemy of the people”.

“The media, in my view, and I feel very strongly about this, is not the enemy of the people. We need a free media,” he said, according to the Daily Record.

Kelly continued: “That said, you have to be careful about what you are watching and reading, because the media has taken sides. So if you only watch Fox News, because it’s reinforcing what you believe, you are not an informed citizen.”

Kelly also questioned Trump’s intervention in the case of Eddie Gallagher, the Navy Seal convicted of posing with the body of a dead Isis fighter. Trump quashed Gallagher’s demotion and then ordered the navy to drop the revocation of his special forces status, leading to the resignation of the navy secretary, Richard Spencer.

The intervention, Kelly said, “was exactly the wrong thing to do. Had I been there, I think I could have prevented it.”

Kelly said he took issue with Trump’s policies in a number of key areas. He said migrants to the US are “overwhelmingly good people” and “not all rapists” – a reference to comments Trump made about Mexican immigrants in 2015.

“In fact, they’re overwhelmingly good people,” Kelly said. “They’re not all rapists and they’re not all murderers. And it’s wrong to characterize them that way. I disagreed with the president a number of times.”

Trump’s border wall, he added, doesn’t need to extend “from sea to shining sea”.

Kelly’s 75-minute address also touched a number of international topics. He said he considered the administration’s efforts to convince North Korea’s leader, Kim Jong-un, to abandon the country’s nuclear weapons program hopeless.

Kelly said: “I never did think Kim would do anything other than play us for a while, and he did that fairly effectively.”

Asked why he had accepted the White House position, Kelly said he didn’t know Trump before 2016, but had been “fascinated – not necessarily in a good way – but fascinated as to what that election meant to our country”.

When he was approached to become secretary of homeland security, he said, his wife urged him to accept the position. “I, frankly, think he needs you and people like you,” she told him.