Evan Vucci / AP

In yet another sign of upheaval at the White House, chief of staff Reince Priebus has been replaced by Homeland Security Secretary John Kelly, President Trump announced via Twitter on Friday. "I am pleased to inform you that I have just named General/Secretary John F Kelly as White House Chief of Staff," Trump tweeted. "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." "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 added. Priebus told CNN Friday evening that he and Trump had often talked about the administration's direction. The president wished to go a different direction, and Priebus offered his resignation, which Trump accepted, he said. "He has the best political instincts," Priebus said in the interview, in which he spoke positively about his relationship with the president and Kelly. "[Trump] knows, I think, intuitively when things need to change. I've seen it now for a year and a half on this wild ride with the president that I loved being a part of. But he intuitively determined that it was time to do something differently. And I think he's right." White House press secretary Sarah Huckabee Sanders told reporters that the president and Priebus had been discussing the timing of his departure for about two weeks. His exit comes after months of speculation that the chief of staff could be ousted at any moment, and just a day after Anthony Scaramucci, the new White House communications director, openly accused Priebus of leaking information to the media and called him “a fucking paranoid schizophrenic, a paranoiac." Sanders said Friday's news had nothing to do with Scaramucci.

Saul Loeb / AFP / Getty Images

One GOP insider said the exit of Priebus and appointment of Kelly one day after the Republicans’ humiliating defeat on health care could be the beginning of a larger White House pivot away from the party establishment, which has failed to deliver in the first six months of Trump's presidency.

"The Republicans he’s been relying on have gotten him absolutely nowhere so it’s interesting that he’s choosing an apolitical military figure in an often highly political job," the insider told BuzzFeed News. In recent days, Trump senior adviser Kellyanne Conway had told people that Priebus was "gone" and that he was trying to figure out his next steps, a source with knowledge told BuzzFeed News. According to Conway, White House staffers who came from the Republican National Committee were out and the administration was "going back to Trump loyalists," the source added. With tensions between White House leaders high, Priebus on Friday traveled with Trump and Scaramucci on Air Force One to New York for a speech on law enforcement and the notorious MS-13 gang. In the speech, Trump praised Kelly, seemingly foreshadowing his favor for the general. "One of our real stars. Truly, one of our stars," Trump said after crediting the reduction in illegal border crossings from Mexico to Kelly. "John Kelly is one of our great stars." Scaramucci remained in New York after the speech. When Air Force One returned to Washington. DC, at Joint Base Andrews, Priebus got off the plane and into an SUV with White House senior adviser Stephen Miller and social media director Dan Scavino. Moments later, Scavino and Miller got out of the SUV and into another vehicle. The SUV carrying Priebus pulled out of the official motorcade.

Priebus is in this van on tarmac at Joint Base Andrews, as Potus has not yet disembarked. Driver pulled van away as… https://t.co/VUqG1XmoDC

The president remained on Air Force One until Priebus was driven away. "Reince is a good man. John Kelly will do a fantastic job," Trump shouted to reporters once he finally deplaned. "General Kelly has been a star, done an incredible job thus far, respected by everybody. He's a great great American. Reince is a good man." In a statement released by the White House, Priebus congratulated Kelly and thanked Trump. "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," he said. Priebus previously served as chairman of the RNC and is considered a Republican Party stalwart, as opposed to a Trump loyalist. During the presidential campaign, he advised Trump to drop out of the race when the lewd Access Hollywood tape was revealed — a fact Trump never let Priebus forgot after his election victory.

As part of his White House role, Priebus was tasked with managing the president's schedule and who he met with, but he had been widely reported to be a "dead man walking" for months.

He was the shortest serving White House chief of staff in modern US history. Rep. Peter King, who was also on Air Force One for the trip, told reporters he had no idea Priebus was moments away from leaving the administration. "We didn't even know it. We were sitting right across from him and he kept a poker face," King said, according to the White House pool. King added that Trump told him only as they were about to deplane that he was going to announce Kelly as chief of staff. In a statement, Kelly thanked the men and women of the Department of Homeland Security for their dedication and spoke of his own public service. "I have been fortunate to have served my country for more than 45 years — first as a Marine and then as the Secretary of the Department of Homeland Security," he said. "I am honored to be asked to serve as the Chief of Staff to the President of the United States."

Nicholas Kamm / AFP / Getty Images Scaramucci on Friday.

Priebus's ouster also represents a significant victory for Scaramucci, who had been openly feuding with Priebus for days. White House press secretary Sean Spicer, a close ally of Priebus, announced that he is resigning after Scaramucci was hired on July 21.

On Wednesday, after telling the New Yorker that he believed Priebus had leaked information about him to the press, Scaramucci tagged his colleague in a now-deleted tweet:

“In light of the leak of my financial info which is a felony. I will be contacting @FBI and the @TheJusticeDept #swamp @Reince45. On Thursday morning, Scaramucci denied that he was openly threatening Priebus with an FBI investigation for supposedly leaking, instead claiming it was "public notice to all leakers that all s[enio]r Admin officials are helping to end public leaks".

That was refuted by his interview in the New Yorker, published Thursday afternoon.

Scaramucci also appeared on CNN Thursday morning, describing his relationship with Priebus as being like "brothers": If you want to talk about [Reince Priebus], we have had odds. We have had differences. When I said we were brothers from the podium, that’s because we’re rough on each other. Some brothers are like Cain and Abel. Other brothers can fight with each other and get along. I don’t know if this is reparable or not, that will be up to the president. In the biblical tale, Cain killed Abel.