Former US Defence Secretary James Mattis has denounced President Donald Trump, accusing him of stoking division and abusing his authority.

In rare public comments, Mr Mattis said the president had sought to “divide” the American people and had failed to provide “mature leadership”.

He said he was “angry and appalled” by Mr Trump’s handling of recent unrest.

In response, the president described Mr Mattis as an “overrated general” and said he was glad he had left the post.

Mr Mattis resigned in 2018 after Mr Trump decided to withdraw US troops from Syria.

He has remained mostly silent since then, until his rebuke of the Trump administration was published in The Atlantic magazine on Wednesday.

In response to the fresh criticism, Mr Trump posted a series of tweets in which he claimed to have fired Mr Mattis.

“I didn’t like his “leadership” style or much else about him, and many others agree,” he wrote. “Glad he is gone!”

What did Mattis say?

“Donald Trump is the first president in my lifetime who does not try to unite the American people – does not even pretend to try,” Mr Mattis wrote in The Atlantic. “Instead, he tries to divide us.”

He continued: “We are witnessing the consequences of three years of this deliberate effort. We are witnessing the consequences of three years without mature leadership.”

Mr Mattis also addressed the recent wave of anti-racism protests that were triggered by the death of African-American George Floyd in police custody earlier this month.

Four officers have been charged in relation to Mr Floyd’s death in Minneapolis on 25 May. The charge against Derek Chauvin was elevated to second-degree murder on Wednesday.

The vast majority of demonstrations over the past nine days have been peaceful, but some have turned violent and curfews have been imposed in a number of cities.

White House compares Trump to Churchill in WW2

“We must not be distracted by a small number of lawbreakers,” Mr Mattis wrote. “The protests are defined by tens of thousands of people of conscience who are insisting that we live up to our values… as a nation.”

The retired general – whose resignation letter in December 2018 was full of implied criticism of the president’s foreign policy – also condemned the use of the military in response to the protests.

“Never did I dream that troops… would be ordered under any circumstance to violate the Constitutional rights of their fellow citizens,” he said.

“Militarising our response, as we witnessed in Washington DC, sets up a conflict… between the military and civilian society,” he added.