Former Defense Secretary Robert Gates (Melina Mara/The Washington Post) Former defense secretary Robert Gates (Melina Mara/The Washington Post)

Former defense secretary Robert Gates gives President Obama a mixed review on his recent foreign policy decisions. He’s sharply critical of the decision to trade Taliban leaders for Sgt. Bowe Bergdahl but generally supportive of Obama’s recent moves regarding Iraq.

Gates’s views, pro and con, are important since, as a Republican appointee who continued to serve under a Democratic president, he has influence with moderates in both parties.

“I understand the importance of not leaving anyone behind — but not at any cost,” Gates said in a telephone interview several days ago. He predicted that at least two of the five Taliban commanders released in the prisoner swap last month will return to the battlefield.

Gates said that he had opposed the swap before he resigned as defense secretary in 2011 and would have done so again, if he had been asked. Chuck Hagel, the current Pentagon chief, disagreed with Gates and his immediate successor, Leon Panetta, and supported the swap.

On Iraq, Gates faulted the Obama administration for “a bit of neglect of Iraq after U.S. troops left” in 2011. But he endorsed Obama’s quiet efforts to seek a change of government in Iraq to replace Prime Minister Nouri al-Maliki, even as the United States works to stiffen Iraqi resistance to the insurgent group known as the Islamic State of Iraq and Syria.

“My own view is that Maliki has to go,” Gates said. But he credited Obama for not making a formal public demand for such changes. “Handling it behind the scenes and quietly is exactly the right course,” Gates said. He said he favored steps to counter ISIS, so long as America can “avoid becoming Maliki’s air force.”

Gates cautioned that while the United States and Iran share the goal of fighting ISIS, Obama should be wary of assuming that the two countries have common interests in Iraq: “When it comes to internal afffairs in Iraq, we’re playing a fool’s game if we assume that we can make common cause with Iran.”