President Trump announced he is replacing White House chief of staff Reince Priebus with his Homeland Security Secretary John Kelly.

Announcing the switch via Twitter, Trump called retired Marine Corps general Kelly a "great American."

Trump has repeatedly praised Kelly for his operation of homeland security, including tighter border controls and a travel ban from six Muslim countries that is currently the subject of a lawsuit.

In a separate tweet, Trump said he thanked Priebus "for his service and dedication to his country." He added: "We accomplished a lot together and I am proud of him."

Yet Priebus's dismissal capped a tumultuous six months marked by staff turmoil and political reversals that Trump often blamed on his chief of staff.

It also comes a week after Trump hired Wall Street businessman Anthony Scaramucci, a move that sparked a long-rumored shake-up among the president's top aides.

Scaramucci accused Priebus of being behind the leaking of unflattering news stores, a cardinal in Trump's eyes. Priebus had tried unsuccessfully to block Scaramucci's hiring.

From the moment Trump became president on Jan. 20, Priebus was the source of near-constant speculation about how long he would last in a White House riven by warring factions.

There has been longstanding staff rivalry between veterans who signed up early for Trump's presidential campaign and Republican National Committee officials brought in for the fall race against Democratic nominee Hillary Clinton.

That tension came to a head when Priebus, the former RNC chairman, objected to the hiring of the hiring of Scaramucci to be the White House's communications director last week.

The appointment of Scaramucci, a prominent television surrogate for Trump during the campaign, prompted the immediate resignation of White House press secretary Sean Spicer on July 21.

Priebus brought with Spicer, a former RNC official, with him to the White House.

Priebus and other officials thought Scaramucci was unqualified for the job, and had blocked him from previous efforts to join the White House.

Yet Priebus was overruled, and Scaramucci was not only hired, but allowed to report directly to Trump – not the White House chief of staff. The days after Scaramucci's hiring also brought the departure of another Priebus ally and former RNC official, senior assistant press secretary Michael Short.

Within a week of his hiring, Scaramucci publicly questioned Priebus and his loyalty to the president, giving aggressive media interviews that appeared to finger the chief of staff as a leaker.

Describing what he called a war on news leaks from senior White House officials, Scaramucci on July 27 cited Priebus in connection with leaks of news stories damaging the president and his aides.

Scaramucci in subsequent television interviews said he wasn't sure if his spat with Priebus over leaks "is reparable or not, that will be up to the president."

He also compared his relationship with Priebus to biblical brothers Cain and Abel, though he did not specify which of them in his Biblical metaphor represented the brother who killed the other.

That same day, the feud escalated when The New Yorker revealed Scaramucci had in a phone interview attacked Priebus in harsh and even vile terms, calling him a "paranoid schizophrenic" and using a vulgar term to illustrate Priebus's attempts to block him from a White House post.

►Make it easy to keep up to date with more stories like this. Download the WZZM 13 app now.

Have a news tip? Email, visit our Facebook page or Twitter.