President Trump on Monday removed Anthony Scaramucci as communications director, ending a tumultuous tenure in the West Wing that lasted just 10 days.

The brash former hedge fund manager lost his job on the same day that Homeland Security Secretary John Kelly assumed his new role as Trump's chief of staff.

The White House cast the move as Scaramucci's decision. Press secretary Sarah Huckabee Sanders said in a statement that "he felt it was best to give chief of staff John Kelly a clean slate and the ability to build his own team."

But speaking to reporters later at a press briefing, Sanders suggested the president made the call to force him out, calling his exit the result of a "mutually agreed conversation that took place between several people."

Scaramucci's quick ouster is being seen as a sign that Kelly could have more power in the chief of staff role than his predecessor, Reince Priebus, ever did.

Scaramucci's hiring on July 21 sent shockwaves through a West Wing already wracked by chaos, contributing to the departure of then-chief of staff Priebus and former White House press secretary Sean Spicer.

Priebus and Spicer both vehemently opposed Scaramucci's hire, and Spicer resigned on the day he joined the staff.

In the aftermath, Scaramucci focused his ire on Priebus, accusing of him of leaking to the press in a profane rant published in The New Yorker that took aim at several other members of Trump's senior staff.

Sanders said those comments played a role in Scaramucci's ouster.

"The president certainly felt that Anthony's comments were inappropriate for a person in that position," she said, adding that Trump, "didn't want to burden Gen. Kelly" in his effort to build a new chain of command in the White House.

"Gen. Kelly has the full authority to operate in the White House and all staff will report to him," Sanders said.

That mandate will be put to the test in the coming days and weeks. Priebus struggled to corral a White House staff made up of rival power centers, including chief strategist Stephen Bannon and Trump's son-in-law Jared Kushner and daughter Ivanka.

Yet Trump allies have expressed hope the arrival of Kelly, a retired Marine general, will help bring discipline to an unruly White House that has been wracked by infighting and leaks.

"Firing The Mooch sends a great signal that the adults are now in charge at the White House," said one senior House Republican who supports Trump. "The president is serious about a reset and an end to the chaos. It's a great first start for Kelly."

Scaramucci seemed to be an obstacle to that goal. He frequently boasted he reported directly to the president and not the chief of staff.

Before his exit, one Trump associate said Kelly's biggest challenge in imposing order would be finding a way to deal with Scaramucci.

"[The] key to success will be laying down discipline and explaining to Anthony that the rules have changed," the associate said.

Scaramucci's official start date was set for Aug. 15, but he was already carrying out the duties of the job, attending meetings in the White House and acting as a surrogate for Trump on television.

The former Wall Street financier worked as the chief strategy officer at the Export-Import Bank before being brought on as communications director, leading to speculation he could return to that role.

Sanders did not rule out such a move but said that, "he does not have role at this time in the Trump administration."

The New York Times first reported the news of Scaramucci's removal.

Scott Wong contributed to this story, which was updated at 4:29 p.m.