President Trump has given his national security adviser, H.R. McMaster, the boot — replacing him Thursday with former Ambassador to the United Nations John Bolton.

“I am pleased to announce that, effective 4/9/18, @AmbJohnBolton will be my new National Security Advisor,” Trump tweeted around 6:30 p.m.

“I am very thankful for the service of General H.R. McMaster who has done an outstanding job & will always remain my friend,” he said. “There will be an official contact handover on 4/9.”

Shortly after the announcement, McMaster — a lieutenant general and veteran of three wars — released a statement, saying he planned to retire from the Army.

“After thirty-four years of service to our nation, I am requesting retirement from the U.S. Army effective this summer after which I will leave public service,” McMaster said, adding that he was “thankful” to Trump for his time as national security adviser.

The president has repeatedly clashed with McMaster and rumors have swirled for weeks that he’d be bounced.

His departure follows Trump’s dramatic ouster of Secretary of State Rex Tillerson last week.