Over the course of this past summer’s war between Hamas and Israel, the Jewish state was subjected to bitter criticism from both the U.S. State Department and the White House. The Obama administration made it clear that it believed Israel’s counter-attack against Hamas missile attacks and terror tunnels was disproportionate. Civilian casualty figures were frequently cited to chide the Israelis for killing and wounding Palestinians. Some of us pointed out that Israel’s efforts to avoid civilian casualties not only gave the lie to these accusations but also actually compared favorably to that of the U.S. military in Syria, Iraq, Afghanistan, and Pakistan. But don’t take my word for it. According to Reuters, earlier this week General Martin Dempsey, the chairman of the Joint Chiefs of Staff, told a New York audience that Israel went to “extraordinary lengths to limit collateral damage and civilians casualties” in Gaza.

The contradiction between Dempsey’s remarks and the blistering criticisms of Israeli behavior uttered by the State Department and White House is instructive. Dempsey not only undermined the credibility of anything said by the U.S. during the war. He also exposed the president’s political agenda against the Jewish state and its government, a point that was made clear in the recent controversy about “senior administration officials” telling The Atlantic’s Jeffrey Goldberg that Prime Minister Netanyahu was a “coward” and a “chickenshit.”

Dempsey told the Carnegie Council for Ethics in International Affairs in New York that the Israelis “did what they could” to avoid civilian casualties. In a war fought with a ruthless terrorist enemy that deliberately hid behind civilians and operating out of mosques, hospitals, schools, and public shelters, there is simply no way to prevent civilians from getting hurt. That’s a point the U.S. military readily understood even if the Obama administration chose to use the pictures of dead civilians as an opportunity to score points at the expense of the Israelis.

But Dempsey went further than sympathizing with his Israeli counterparts:

Dempsey said the Pentagon three months ago sent a “lessons-learned team” of senior officers and non-commissioned officers to work with the IDF to see what could be learned from the Gaza operation, “to include the measures they took to prevent civilian casualties and what they did with tunneling.”

The general said civilian casualties during the conflict were “tragic, but I think the IDF did what they could” to avoid them.

He said he thought his Israeli counterpart would look at lessons learned from the conflict to see what more could be done to avoid civilian deaths in future operations.

“The IDF is not interested in creating civilian casualties. They’re interested in stopping the shooting of rockets and missiles out of the Gaza Strip and into Israel,” Dempsey said.

The subtext to the administration’s attacks on the Israelis about Gaza is that the president has been deeply involved in ordering air strikes on terrorist targets throughout the Middle East. While there’s no doubt that the American military is as interested in avoiding harm to civilians as the Israelis, they know very well that many are killed or wounded when bombs are dropped on those responsible for terrorism. The only difference between the two conflicts is not in the character of the targets. There isn’t much difference between the Islamist killers of Hamas and those of al-Qaeda or ISIS. But the international media doesn’t pay nearly as much attention to such attacks when Israelis aren’t involved. Moreover, the media’s coverage of Gaza was incredibly one-sided as no pictures of Hamas fighters or missile launches were published or broadcast despite the army of journalists roaming the strip during the conflict.

But the issue is not merely the falsity of the American carping about Israeli actions. There’s little doubt the White House and the State Department were well aware of the U.S. military’s opinion of what was going on in Gaza or the fact that American actions ordered by Obama produce much the same results.

The American military is right to seek to learn the lessons of Gaza and to do what they can to emulate Israeli actions. But the real agenda at play in Washington on this issue has been a concerted effort by the Obama administration to undermine Israel’s right of self-defense in order to weaken its ability to stand up to U.S. pressure. Seen in that light, the real lesson to be culled from this episode is that everything that comes out of the mouths of the president’s foreign-policy team with respect to Israel should be considered false until proven otherwise.