Breaking News Emails

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

President Barack Obama called former Pentagon chief Robert Gates an “outstanding” Defense Secretary Monday but refuted Gates' suggestion that he lost faith in the mission in Afghanistan.

“Just as I have continued to have faith in our mission, most importantly, I’ve had unwavering confidence in our troops and their performance in some of the most difficult situations imaginable,” Obama said during a meeting with Spanish President Mariano Rajoy Brey after a reporter asked him about Gates' criticism. “And that job is not yet done.”

President Barack Obama speaks during a bilateral meeting with Spanish Prime Minister Mariano Rajoy in the Oval Office of the White House on January 13, 2014 in Washington.MANDEL NGAN / AFP - Getty Images

Adding that part of the president’s job is to question the details of military strategy, Obama said that his team – including Gates – “got the policy right.”

“War is never easy, and I think that all of us who have been involved in that process understand that,” he said.

In a new memoir, Gates criticized the White House for being overly sensitive to politics and wrote that the president was “skeptical if not outright convinced” that the strategy in Afghanistan would fail.

“As I sat there, I thought: The president doesn't trust his commander, can't stand [Afghan President Hamid] Karzai, doesn't believe in his own strategy and doesn't consider the war to be his," Gates wrote. "For him, it's all about getting out."

Obama would not comment on whether Gates should have waited to publish the book until after the president left office in 2017.

"During his tenure here, Secretary Gates was an outstanding secretary of defense, a good friend of mine, and I'll always be grateful for his service," Obama said.