U.S. President Donald Trump's communications director, Anthony Scaramucci, was ousted Monday after just 10 days on the job, the latest staff upheaval to hit the Republican's six-month-old administration.

The move came just hours after Trump swore in a new chief of staff, retired general John Kelly, who requested the dismissal, according to the New York Times and Politico, citing two unidentified White House officials.

The White House confirmed that Scaramucci was leaving his role as communications director, saying in a statement, "Mr. Scaramucci felt it was best to give Chief of Staff John Kelly a clean slate and the ability to build his own team. We wish him all the best."

'Inappropriate' comments

Scaramucci, the 53-year-old founder of SkyBridge Capital, a hedge fund investment firm, has been in the spotlight since he was first announced as communications director 10 days ago.

He came in vowing to take "dramatic action" to stop leaks to reporters from the White House, then called a reporter at New Yorker magazine and delivered a profanity-laden tirade against Reince Priebus, Trump's chief of staff at the time. A day later, Priebus resigned and was replaced by Kelly. Scaramucci was also said to be the reason White House spokesperson Sean Spicer left, handing in his resignation the same day Scaramucci was appointed.

Shortly before Kelly was sworn in early Monday, Trump insisted on Twitter that his administration was not beset by chaos, as some media have suggested. (Joshua Roberts/Reuters )

In a briefing Monday afternoon, White House press secretary Sarah Huckabee Sanders declined to comment on whether Scaramucci was asked to leave or resigned voluntarily.

"The president certainly felt that Anthony's comments were inappropriate for someone in that position, and he [the president] didn't want to burden Gen. Kelly with that line of succession."

One reporter said that Trump is no stranger to "salty language" and asked which of Scaramucci's comments he had found inappropriate.

"He said 'for someone in that position,'" Sanders repeated.

She said that Scaramucci "does not have a role at this time in the Trump administration."

​Scaramucci's departure follows a rocky couple of weeks in Trump's presidency, with the loss of two key staffers and the failure in Congress of Trump's promised health-care overhaul.

Kelly is being hailed as someone who can bring order to a White House riven with factions and backbiting.

"Kelly, I think, will bring new structure to the White House and discipline and strength, and we're all excited to work with him," Sanders said.

Kelly has been given "full authority to carry out business as he sees fit," and all White House staffers will now report to him, including advisers such as Trump's daughter Ivanka and son-in-law Jared Kushner.

Earlier Monday, Trump hit back at reports that his White House was in chaos.

"Highest Stock Market EVER, best economic numbers in years, unemployment lowest in 17 years, wages raising, border secure, S.C.: No WH chaos!" he said on Twitter.

Highest Stock Market EVER, best economic numbers in years, unemployment lowest in 17 years, wages raising, border secure, S.C.: No WH chaos! —@realDonaldTrump

In another blow to Scaramucci Monday, Harvard Law School apologized for erroneously listing him as dead in a new alumni directory.

Scaramucci is a 1989 graduate of the Cambridge, Mass., school. A directory mailed to alumni this week included an asterisk by his name indicating he had died.

In a statement, the law school apologized for the error and said it will be corrected in future editions of the directory, which is published every five years. It didn't provide an explanation for the error.

Later in the day, Trump tweeted, "A great day at the White House."