WASHINGTON (Reuters) - Defense Secretary Jim Mattis openly differed with his commander in chief over North Korea on Wednesday, the latest example of a once-rare public display of disagreement by top U.S. aides that has become more frequent under President Donald Trump.

FILE PHOTO: U.S. President Donald Trump (L) is introduced by Defense Secretary James Mattis (R) during the commissioning ceremony of the aircraft carrier USS Gerald R. Ford at Naval Station Norfolk in Norfolk, Virginia, U.S. on July 22, 2017. REUTERS/Jonathan Ernst/File Photo

“We are never out of diplomatic solutions,” Mattis told reporters, just hours after Trump said in a tweet that “talking is not the answer” to the standoff over North Korea’s nuclear weapons and missile programs.

His public contradiction of Trump’s position came a day after the Pentagon chief, a retired four-star Marine general, appeared to delay implementation of Trump’s decision to ban transgender people from enlisting in the military.

Mattis was also among the senior aides, including Secretary of State Rex Tillerson and White House economic adviser Gary Cohn, who implicitly criticized the Republican president’s response to violence at a rally organized by white nationalists in Charlottesville, Virginia, earlier this month.

Presidents often disagree with senior advisers over policies or other matters but the differences are usually confined to internal deliberations and become public only through leaks or much later in memoirs, historians and former government officials said.

“I haven’t seen a modern president with a pattern of this many high officials saying things like that,” said Michael Beschloss, a presidential historian.

Asked in a television interview on Sunday whether Trump’s initial comments blaming “many sides” for the violence in Charlottesville instead of focusing on neo-Nazis and white nationalists raised questions about his values, Tillerson said simply: “The president speaks for himself.”

White House spokeswoman Sarah Sanders sought to play down the significance of Tillerson’s comments.

“I don’t think anyone has tried to distance themselves. I think that at moments maybe you have people that disagree. I think that’s a healthy thing for you to be able to have productive conversation,” Sanders told reporters on Air Force One on Tuesday.

But Beschloss said the differences being aired publicly were notable.

“These are people protecting their reputations in real time, and that is something you usually do not see in high-level officials around a president,” he said.

‘BEST ADVICE’

Mattis has repeatedly made clear that diplomacy - backed by a credible military option - is the only way to prevent the North Korea crisis from escalating into a potentially devastating conflict.

When asked about Mattis’ comments on Wednesday, chief Pentagon spokesperson Dana White said: “Secretary Mattis provides the President with his best advice. It is the President who makes the ultimate decisions.”

Leon Panetta, who served as defense secretary and CIA director under former Democratic President Barack Obama, said the airing of differences inside the Trump administration had its roots in the president’s habit of sharing his opinions in Twitter posts.

“I think the problem is that they (advisers) are now dealing with a president who tweets his thoughts to the country,” said Panetta, who has said he had his own policy differences with Obama.

“He’s not the kind of individual who sits down with his national security team and tries to work these issues out in a policy process that is confined to the White House.”

Earlier this month, a video posted on social media showed Mattis telling U.S. troops that the United States has problems that its military does not have. “You just hold the line until our country gets back to understanding and respecting each other and showing it,” he said.

The impromptu speech, believed to have been made during an Aug. 21 visit to Jordan, came after the violence in Charlottesville in which a woman was killed and many people were injured.

Cohn clearly distanced himself from Trump’s comments on the violence, and officials said he considered resigning.

“Citizens standing up for equality and freedom can never be equated with white supremacists, neo-Nazis, and the KKK (Ku Klux Klan),” he said in an interview with the Financial Times on Aug. 25.

Jennifer Lawless, a professor of government at American University, said it was significant that several of Trump’s advisers distanced themselves from Trump’s comments on Charlottesville.

“That makes it very difficult for him” to retaliate against individual advisers, she said. “You can’t go after every single member of your Cabinet. That makes it look like maybe you’ve made wrong choices.”