President Trump said he named John Kelly, the secretary of Homeland Security, as his new chief of staff, replacing Reince Priebus.

"I am pleased to inform you that I have just named General/Secretary John F Kelly as White House Chief of Staff. He is a Great American, and a Great Leader. John has also done a spectacular job at Homeland Security. He has been a true star of my Administration," Trump announced on his Twitter account Friday afternoon.

"I would like to thank Reince Priebus for his service and dedication to his country. We accomplished a lot together and I am proud of him!" Trump continued.

Kelly, a former Marine general, replaces Priebus, who served for six months since the inauguration and was said to be on the outs. White House press secretary Sarah Sanders said Kelly starts Monday and will attend a Cabinet meeting after he is sworn in.

"General John Kelly is one of the true stars of the Administration," she said in a statement. "He has helped seal the border and reduced illegal immigration by 70 percent. He is respected by everyone, especially the people at the Department of Homeland Security. The entire Administration loves him and no one is comparable."

Priebus says he resigned privately on Thursday, but it has been reported that Trump told Priebus two weeks ago he would be replacing him.

It's unclear who Trump will pick to replace Kelly as head of the Department of Homeland Security. The agency announced Friday evening that the deputy DHS secretary, Elaine Duke, will serve as acting secretary when Kelly starts his new job on Monday.

"The President thanks Reince Priebus for his service," Sanders said. "They accomplished a lot together. He was loyal in his dedication to the President. The President thanks him and his family for his great service to the country, and he will always be a member of the Trump Team."

The New York Times reported Thursday that Trump wanted to name "a general" as his new chief of staff and was favoring Kelly to replace Priebus, who previously served as the chairman of the Republican National Committee.

However, some of his aides were advising against it.

Priebus' standing as White House chief of staff had been shaky for months, but the recent hiring of incoming White House communications director Anthony Scaramucci fueled rumors that Priebus was on his way out.

In a profanity-laced interview with the New Yorker published Wednesday night, Scaramucci threatened to fire Priebus for leaking information to the press and called him a "fucking paranoid schizophrenic, a paranoiac."

"Reince Priebus — if you want to leak something — he'll be asked to resign very shortly," Scaramucci said.

David Nakamura, a White House reporter for the Washington Post, posted photos on Twitter after Trump named Kelly his new chief of staff of Priebus in a van on the tarmac at Joint Base Andrews just after Trump returned from a speech in Long Island.

"Priebus is in this van on tarmac at Joint Base Andrews, as Potus has not yet disembarked. Driver pulled van away as press moved toward it," he wrote.

Scaramucci elevated his feud with Priebus earlier this week when he suggested on Twitter that Priebus leaked Scaramucci's financial disclosure form to a reporter. The form, though, was available to the public upon request the reporter said, and Scaramucci backtracked from his comments, saying his tweet only meant to serve as a warning that senior members of the administration were committed to tamping down on leaks.

When asked about tensions between Scaramucci and Priebus on Thursday, Sanders declined to answer questions about Priebus's future, saying only that Trump has hired people of varying viewpoints.

"I think what we have — this is a White House that has a lot of different perspectives because the president hires the very best people," she told reporters Thursday.

Priebus was said to butt heads with White House chief strategist Steve Bannon at the beginning of the administration, but the two have since warmed to one another.

Still, the former RNC chairman has struggled with the various power centers within the White House, and some of his allies departed in recent months.

In March his deputy and former RNC chief of staff Katie Walsh left her position. Last week, White House press secretary Sean Spicer, who also served with Priebus at the RNC, resigned in protest of Scaramucci's hiring.

Scaramucci is reported to be shaking up the White House press team, with more departures expected in the coming days.