Most people take Memorial Day weekend as a time for beaches and family barbecues. US Secretary of Defense Ash Carter spent it being publicly, frighteningly wrong about a key front in America's war against ISIS.

Carter went on CNN's State of the Union Sunday morning to talk about the state of the war in Iraq. In the interview, Carter said Iraqi soldiers had suffered a major defeat recently because they weren't willing "to fight [ISIS] and defend themselves."

Carter is wrong: that's just not what happened in Ramadi. But worse, his statement is also counterproductive: for the US-led campaign against ISIS to work, the United States needs to bolster the Iraqi military — not tear it down publicly.

What Carter got wrong

Carter's comments were specifically about Ramadi, the provincial capital of Iraq's western Anbar, which ISIS conquered in mid-May. This was ISIS's biggest victory in almost a year, and Carter blamed it on something that sounds a lot like Iraqi cowardice.

"What apparently happened [in Ramadi] is that the Iraqi forces showed no will to fight," the secretary said. "They were not outnumbered: in fact, they vastly outnumbered the opposing force. And yet they failed to fight."

The problem with this narrative is that it is totally wrong. Iraqi forces didn't turn tail in the face of a weaker ISIS force: they retreated after an 18-month siege by ISIS and virtually no reinforcements from Baghdad. They had a hell of a lot of "will to fight," but couldn't hold out long enough.

Anbar province is an ISIS stronghold: the mostly Sunni province had never been a priority for Iraq's Shia-dominated government, and ISIS took full advantage of Baghdad's neglect in its decision to target Ramadi. ISIS's siege of the city began around December 2013, well before ISIS came to international attention by sweeping northern Iraq in June 2014.

For the past 16 months "the city's overstretched collection of Iraqi army, police, and Sunni tribal militia forces have fought a brutal, nonstop battle with little reinforcement," Michael Knights, the Lafer fellow at the Washington Institute for Near East Policy, writes. And yet, according to Knights, "the Iraqi security forces (ISF) maintained the upper hand in Ramadi until recently."

How ISIS really took Ramadi

So what changed?

ISIS devoted massive resources to the siege, while most of the Iraqi army's resources were directed elsewhere in the country. While Carter is right that the ISIS forces in the mid-May attack were probably outnumbered, that's really misleading. If you tally up all of the ISIS forces devoted to Ramadi in the past nine months, the Iraqis had faced numbers about "six or seven times bigger than they were," Daveed Gartenstein-Ross, a senior fellow at the Foundation for the Defense of Democracies, estimated in a phone conversation. "They actually last longer than one might expect given the forces they were up against."

ISIS only took the city after what Gartenstein-Ross describes as a "brilliant series of maneuvers": a complicated offensive involving a massive number of vehicle-borne improvised explosive devices that blew up "entire city blocks," according to a US official quoted by the Wall Street Journal. Some of this happened under the cover of a sandstorm, making US air support for the beleaguered Iraqis difficult.

Facing a sophisticated ISIS assault, with no prospect of relief, Iraqi commanders ordered a retreat. "They did not simply drop their guns and run pell-mell," Ken Pollack, a senior fellow at Brookings, writes. While some of the other, less-disciplined fighters may have retreated more hastily, Carter's depiction of a general Iraqi collapse is just wrong.

Why Carter's mistake matters

It's troubling that the US Defense Secretary's military analysis of a war the US is involved in is so inaccurate. But perhaps more disturbingly, Carter's CNN comments actually undermine America's strategy in Iraq.

The basic American strategy in Iraq depends on the Iraqi security forces. Airstrikes support their offensives, and they receive American training and equipment. But the bottom-line goal is to support local Iraqi efforts to take ISIS territory and keep the group out.

But that means strengthening the ISF, not just relying on them to fight on our behalf. There are only a small number of effective Iraqi military units, and they're badly overstretched in the ISIS war. And because of their lack of resources and poor discipline, the ISF have been plagued by mass defections and general incompetence, even though that's not what happened in Ramadi. The US strategy won't be effective unless it helps the ISF overcome those problems.

That is an especially serious matter because Iranian-backed Shia militias are also fighting ISIS, and are competing with the Iraqi government for popular support. But while the militias have proven quite effective on the battlefield, they also do horrible things to Sunni civilians and are aligned with hard-line Shia sectarian parties. Their victories threaten to undermine Iraq's fragile government in the long run.

That means the US is attempting a very delicate balancing act in Iraq. On the one hand, it wants to push ISIS out of its Iraqi territory, and that requires letting the militias do some of the fighting. On the other hand, it wants to foreground ISF victories and minimize militia offensives as much as possible to ensure Abadi gets the political credit.

The best way to achieve that balance is by bolstering Iraqi Prime Minister Haider al-Abadi and the official Iraqi security forces. Supporting these leaders helps show Iraqis that the United States, along with its powerful military, is committed to helping their government root out ISIS.

But when America's top defense official publicly calls the ISF incompetent, Iraqis notice — and Iran and its militias start to seem like a more reliable bet for the anti-ISIS campaign.

"Ramadi was an enormous political defeat for Abadi," writes Kirk Sowell, the principal at Uticensis Risk Services and an expert on Iraqi politics. "US officials [should] stop making it worse."

Iran and its proxy militias are already working hard to convince Iraqis that they're the only reliable guardians of Iraqi security. There's no need for the secretary of defense to do their job for them.