President Trump has told senior aides that he's firing Steve Bannon as his White House strategist, the White House confirmed Friday.

"White House Chief of Staff John Kelly and Steve Bannon have mutually agreed today would be Steve's last day," White House Press Secretary Sarah Huckabee Sanders said in a statement. "We are grateful for his service and wish him the best." 

Mr. Trump and senior officials at the White House have been debating when to get rid of Bannon and how, the New York Times said, according to two administration officials.

A person close to Bannon said him leaving was his idea, that report said, and that he had actually submitted his resignation to Mr. Trump on Aug. 7. The report added that his departure was supposed to be revealed publicly at the beginning of the week, but Charlottesville forced the White House to hold off.

At his press conference at Trump Tower earlier this week, Mr. Trump was asked if he has confidence in Bannon.

"Well, we'll see… Look, look, I like Mr. Bannon," Mr. Trump said. "He is a friend of mine. Mr. Bannon came on very late. You know that. I went through 17 senators, governors and I won all the primaries. Mr. Bannon came on very much later than that. And I like him. He is a good man. He is not a racist. I can tell you that. He is a good person. He actually gets a very unfair press in that regard. We'll see what happens with Mr. Bannon. He is a good person and I think the press treats him frankly very unfairly."

The Associated Press has confirmed that Bannon is leaving the White House.