On Tuesday, the White House scrambled to clarify remarks by President Obama’s fourth defense secretary, Ashton B. Carter, at right. (Chip Somodevilla / Pool/EPA)

President Obama has not had an easy time with his secretaries of defense.

Two of his defense secretaries wrote books critical of his administration after they left office, and his third was essentially fired. On Tuesday, the White House scrambled to clarify remarks by Obama’s fourth defense secretary, Ashton B. Carter, who said over the weekend that Iraqi forces who collapsed in their defense of Ramadi lacked the “will to fight” Islamic State militants.

Carter’s pronouncement, unusual for its bluntness, angered senior Iraqi officials in Baghdad and seemed to suggest that the president’s strategy, built around supporting Iraqi forces with training and airstrikes, was failing. “Airstrikes are effective, but neither they nor really anything we do can substitute for the Iraqi forces’ will to fight,” Carter said in an interview with CNN. He added that the Iraqi government force, which “vastly outnumbered” the Islamic State attackers, simply refused to fight in Ramadi.

Asked about Carter’s remarks, White House press secretary Josh Earnest pointed to some of the successes Iraqi forces had earlier this year in retaking the cities of Tikrit and Baghdadi from the Islamic State. In both battles, a multi-sectarian force of Iraqi fighters backed by U.S. air power and under the central command of the Iraqi government won relatively quick victories. And he praised the leadership of Iraqi Prime Minister Haider al-Abadi.

“It’s very clear what our strategy is, and it’s clear that strategy is one that has succeeded in the past,” Earnest said.

Carter still has the strong support of the president, and there is little sign that he is pressing internally for a change in the overall strategy in Iraq. His remarks and the controversy they produced, however, highlight the perils of running the Pentagon at a time when the United States is counting heavily on frequently unreliable local partners to battle Islamic State fighters on the ground in places such as Iraq, Syria and Yemen.

“The State Department never loses a battle or loses a war. Their defeats are much more nebulous,” said retired Army Lt. Gen. David Barno, who commanded U.S. forces in Afghanistan and is a scholar in residence at American University. “It’s crystal clear when you lose Ramadi.”

The past few weeks have been particularly tough ones for Iraqi forces. Iraqi officials had been planning to launch a major attack soon to retake territory in western Iraq’s Anbar province, where Ramadi is the provincial capital. The unexpected collapse of the Iraqi forces in Ramadi, including some of the Iraqi army’s elite counterterrorism troops, cast doubt over that coming offensive.

“It’s easier to have a clear, consistent, unified story when a policy is working,” said Stephen Biddle, director of the Institute for Security and Conflict Studies at George Washington University. “Ramadi clearly indicates the policy isn’t working.”

The controversy over Carter’s remarks is different in many ways than the conflicts Obama had with his predecessors. Former defense secretaries Robert M. Gates and Leon Panetta both complained in memoirs of micromanagement from the White House. Obama concluded that Chuck Hagel, who preceded Carter at the Pentagon, was not well equipped to lead the fight against the Islamic State.

Carter’s comments seem to fall under political journalist Michael Kinsley’s definition of a “gaffe”: “A gaffe is when a politician tells the truth — some obvious truth he isn’t supposed to say,” Kinsley once said.

“This is a diplomatic gaffe,” said Richard Fontaine, president of the Center for a New American Security. “Everyone knows that . . . the issue is one of will — will of Sunnis in the Iraqi security forces to fight for a Shia-led military, and the will of Shia to fight for Sunni land.”