US President Donald Trump has announced that retired General John Kelly will be his new chief of staff, replacing Reince Priebus, in a major shake-up of his top team.

Trump announced the move in a series of tweets a day after his new communications director, Anthony Scaramucci, accused Priebus of leaking information to reporters in a profanity-laced tirade.

"I am pleased to inform you that I have just named General/Secretary John F Kelly as White House Chief of Staff," Trump said via Twitter on Friday.

After the announcement, the US president told reporters that "John Kelly will do a fantastic job".

Kelly, 67, who retired from the Marine Corps, was serving as the secretary for the Department of Homeland Security under the Trump administration.

White House spokeswoman Sarah Huckabee Sanders said in a statement that Kelly will begin his work as chief of staff on Monday morning.

OPINION: Who are the US police really protecting?

Al Jazeera's Heidi Zhou-Castro, reporting from Washington, DC, said that the announcement "caps off a turbulent and dramatic week of infighting within Trump's White House communications team in particular".

Trump had lost confidence in Priebus, privately questioning his competence after major legislative items have failed to pass in Congress, someone close to Trump told Reuters news agency.

He had been under fire for weeks, seeing one White House ally after another resign or leave, culminating in the recent departure of press secretary Sean Spicer.

A senior White House official told Reuters news agency that Trump had informed Priebus that he would be replacing him two weeks ago.

Trump thanked Priebus for "his service and dedication" to the country.

Trump did not make clear his plans for filling the secretary of homeland security position.

A retired general, Kelly served as commander of the US Southern Command in Central and South America and the Caribbean.

Reince Priebus in a statement thanked Trump for giving him the opportunity to serve as chief of staff and said it had been "one of the greatest honours of my life to serve this President and our country".

"I will continue to serve as a strong supporter of the President's agenda and policies. I can't think of a better person than General John Kelly to succeed me and I wish him God's blessings and great success."

'Changing of guards'

Brian Darling, founder of Liberty of Government Affairs, told Al Jazeera Kelly's reputation as a tough operator with a military - rather than political - background could improve the White House's fortunes.

"Maybe that's what they need over there - some strong leadership in the chief of staff's office," said Darling.

"Maybe that stylistic change will get everybody on the same page because, as we've seen, things have been troublesome over there - the Trump agenda has been stalled in Congress."

READ MORE: Can Muslim politicians survive in today's US?

Al Jazeera's Zhou-Castro said that the removal of Priebus was long expected and that the move boils down to a "final changing of guards, perhaps, among the White House staff".

"Trump had long campaigned against the Republican establishment and Reince Priebus - who was the former chair of the Republican National Committee and was still very close with House Speaker Paul Ryan - represented the last remnants of that establishment in the White House."

Our correspondent said it was also significant that Scaramucci - a billionaire businessman with no government experience - came in as director of communications last week and also replaced a former establishment figure in Sean Spicer.

"Again, it's Trump moving more towards the direction of bringing in these political newcomers to lead his team," she said.