WASHINGTON - White House press secretary Jay Carney is leaving his post and his No. 2 is taking over.

President Barack Obama announced Carney's departure in a surprise appearance at in the White House press briefing room Friday. He said principal deputy press secretary Josh Earnest will take over the job.

Obama called Carney one of his closest friends and a great press secretary whom he said will continue to rely on as an outside adviser.

The president said Carney plans to take the summer off before getting a new job.