Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

President Barack Obama made a surprise appearance Friday to announce that his chief spokesman Jay Carney is leaving his post behind the podium.

Obama called Carney one of his closest advisers and friends at the White House in remarks to the press in the White House briefing room.

"In April, Jay came to me in the Oval Office and said that he was thinking of moving on, and I was not thrilled, to say the least," he said. "But Jay has had to wrestle with this decision for quite some time."

"I will continue to rely on him as a friend and an adviser after he leaves to spend as much of his summer as he can with his kids before he decides what's next for him," he added. "Whatever it is, I know he's going to be outstanding at it."

Carney, who has served as press secretary for over three years, called holding the job "an honor and a joy for me."

Obama announced that communications deputy Josh Earnest will take over the job as the president's press secretary.

"Today the flak jacket is officially passed to a new generation," he said of Earnest.