Washington (CNN) Democratic presidential candidate Pete Buttigieg attacked rival Joe Biden on Sunday over Biden's support for the invasion of Iraq, saying Biden had "supported the worst foreign policy decision made by the United States in my lifetime."

Biden's Monday response was misleading -- both about his past position on the war in Iraq and about his past position on the war in Afghanistan.

Biden and Afghanistan

Before he addressed his past position on Iraq in particular, Biden touted his broader foreign policy record. Citing judgment calls he said had been vindicated, such as his opposition to US intervention in Libya, he told the editorial board of New Hampshire's Seacoast Media Group: "I'm the guy that -- as has been pointed out repeatedly -- that thought we should not be going into Afghanistan."

Biden might have just been speaking imprecisely here, but the result was misleading no matter what his intentions.

Biden did not oppose the US invasion of Afghanistan. As a US senator from Delaware, he joined his Senate colleagues in a unanimous vote in support of the 2001 resolution that authorized the use of military force against "nations, organizations, or persons" President George W. Bush determined were behind the terrorist attacks of September 11, 2001.

What, then, was Biden talking about when he said he was the man who "thought we should not be going into Afghanistan"? He was referring to his opposition to President Barack Obama's "surge" of additional troops into the country when Biden was vice president in 2009, a campaign official said on condition of anonymity. (Biden is known to have argued against the surge in internal debates.)

Indeed, Biden's next comments to the editorial board were about how he urged Obama-era military leaders to use a smaller military footprint in Afghanistan than some of them wanted.

So Biden can accurately say --- as he did at a debate earlier this month -- that he opposed the deployment of extra troops to Afghanistan more than seven years into the war. But that is not what he said to the editorial board.

Biden and Iraq

Following his comments about Afghanistan, Biden turned to his Senate vote in October 2002 to authorize Bush to use military force against Iraq.

Biden told the editorial board that it's important to remember the "context." Biden went on to say that Bush had "promised me" that the congressional resolution would "only" be used to get the United Nations Security Council to vote on "whether or not we can get inspectors in to determine what Saddam Hussein was doing." Biden continued: "And he did that. But then he went to war."

Biden himself was leaving out important context.

Regardless of what did or didn't transpire between Bush and Biden behind closed doors -- Bush's spokesman denied to NPR in September that he had made Biden any such private promise -- Biden omitted his own extensive comments endorsing a war in Iraq, both before and after the congressional vote. And Biden omitted his post-invasion declaration that his vote had been "correct."

Biden did argue during the 2002 Senate debate that passing the resolution would actually reduce the chances of war, since, in his view , passage would increase the chances of a "tough" Security Council resolution that would help weapons inspectors gain permission to enter Iraq. (After the resolution was passed, Bush continued to express hope that Iraq's "threat" could be resolved "peacefully.")

But Biden made clear in the same Senate speech that he knew a war might still happen -- and he also made clear that he was not opposed in principle to even a war conducted by the US alone.

"There is also a chance Saddam will once again miscalculate, that he will misjudge our resolve, and in that event we must be prepared to use force with others if we can, and alone if we must," Biden said. "The American people must be prepared. They must be prepared for the possible consequences of military action."

Biden had previously made similar comments in which he both called for more diplomacy and expressed support in principle for possible unilateral action. In 2002, he spoke about finding a way to end the Hussein regime "one way or another" and called for the US to build an international alliance for doing so -- but said that the US could use military force "with or without the help of our allies," as our KFILE team reported in a deep dive in September on Biden's Iraq position.

In February 2003, a month before the war started, Biden gave a Delaware speech in which, according to a text available on an archived version of his Senate website, he warned that Bush had not informed Americans how difficult it would be to "win the peace" in Iraq after the invasion.

Amid his cautions about the challenges of occupation, however, he added, "Let everyone here be absolutely clear: I supported the resolution to go to war. I am NOT opposed to war to remove weapons of mass destruction from Iraq. I am NOT opposed to war to remove Saddam from those weapons if it comes to that."

In a July 2003 speech at the Brookings Institution, Biden said, "Nine months ago, I voted with my colleagues to give the President of the United States of America the authority to use force and I would vote that way again today. It was the right vote then and would be a correct vote today."

Biden also criticized the Bush administration early in the war, saying again that Bush officials were not being truthful with the American people about how long and hard the conflict would be. He warned on CNN in July 2003 that "if we don't make real progress very soon, what will happen is we'll lose the support of the Iraqi people, and then there will be hell to pay."

By 2005, Biden had begun calling his vote in favor of the 2002 resolution "a mistake."

In his Monday comments, Biden did not repeat the false statement he made in an NPR interview that aired in September, in which he inaccurately claimed to have opposed the war from the "moment it started." (Biden's campaign later said he "misspoke.") But he was still not telling the full truth.

The Biden campaign declined to comment on his latest Iraq remarks. Biden spokesman Andrew Bates told CNN for the September article that Biden worked in "good faith" to get UN weapons inspectors into Iraq and avert an invasion.

"His good faith was not reciprocated and even once inspections were back on track the Bush administration plunged the nation into war," Bates said. "As he has long said, his vote was a mistake."