President Obama in a surprise announcement Friday said White House press secretary Jay Carney was stepping down and that his deputy, Josh Earnest, would take over the post.

Carney, a former political reporter, has served as White House press secretary since February 2011.

"One of Jay's favorite lines is, 'I have no personnel announcements at this time,' " Obama said, shocking the assembled White House press corps. "But I do, and it's bittersweet. It involves one of my closest friends here in Washington.

"He's got good judgment, he has good temperament and he's got a good heart," the president added. "And I'm going to miss him a lot."

Carney, Obama's second press secretary, did not reveal his next professional move.

After praising Carney, Obama said the "flak jacket is officially passed to a new generation, Mr. Josh Earnest."

It's been a busy day of personnel announcements at the White House, as earlier Friday, Obama accepted the resignation of Veterans Affairs Secretary Eric Shinseki. Obama said he waited to announce Carney's decision until he could first address the VA matter.

Carney, a longtime reporter at Time Magazine, often touted his journalism experience in his dealings with the White House press corps. Still, Carney's tenure was marked by numerous dust-ups with reporters, as journalists often complained about a lack of transparency from the White House.

And Carney was the public face of the administration's response to various controversies during a rough start to Obama's second term, including the botched rollout of Obamacare and deadly lapses in medical care at VA hospitals.

Obama's top spokesman said that Friday did not mark his last daily briefing with reporters.