It began with comments Obama made in August, 2007 that if elected, he would make U.S. aid to Pakistan conditional: "Pakistan must make substantial progress in closing down the training camps, evicting foreign fighters, and preventing the Taliban from using Pakistan as a staging area for attacks in Afghanistan."
I understand that President Musharraf has his own challenges. But let me make this clear: There are terrorists holed up in those mountains who murdered 3,000 Americans. They are plotting to strike again. It was a terrible mistake to fail to act when we had a chance to take out an al Qaeda leadership meeting in 2005. If we have actionable intelligence about high-value terrorist targets and President Musharraf will not act, we will.
For Obama's campaign opponents, the comments became an illustration of the idea that Obama was too inexperienced to be president -- both for having the idea of acting without Pakistan's permission, and for being green enough to tell people about it.
On February 19, 2008, McCain spoke at a victory party for his win in the Wisconsin primary, and wondered: "Will we risk the confused leadership of an inexperienced candidate who once suggested bombing our ally, Pakistan?"
The following day, he called Obama "naive" and doubled down: "The first thing you do is, you don't tell people what you're gonna to do. You make plans and you work with the other country that is your ally and friend, which Pakistan is."
"You don't broadcast and say that you're going to bomb a country without their permission or without consulting them. It's just fundamentals of the conduct of national security policy," McCain added.
In a Democratic primary debate on February 26, 2008, Hillary Clinton picked up the meme: "Last summer, he basically threatened to bomb Pakistan, which I don't think was a particularly wise position to take."
During the general election, McCain continued to trumpet the same point. At a September 26 debate, McCain said: "I'm not prepared at this time to cut off aid to Pakistan. So I'm not prepared to threaten it, as Senator Obama apparently wants to do, as he has said that he would announce military strikes into Pakistan."
"Now, you don't do that. You don't say that out loud," McCain said. "If you have to do things, you have to do things, and you work with the Pakistani government."
"Nobody talked about attacking Pakistan," Obama replied. "Here's what I said, and if John wants to disagree with this, he can let me know: That, if the United States has al Qaeda, bin Laden, top-level lieutenants in our sights, and Pakistan is unable or unwilling to act, then we should take them out. Now, I think that's the right strategy; I think that's the right policy."
And then there was the town hall on October 7, 2008. Obama answered a question about Pakistan with his now-familiar refrain: "And if we have Osama bin Laden in our sights and the Pakistani government is unable or unwilling to take them out, then I think that we have to act and we will take them out. We will kill bin Laden; we will crush Al Qaeda. That has to be our biggest national security priority."
McCain followed that up "in fact, [Obama] said he wants to announce that he's going to attack Pakistan. Remarkable."
"If you are a country and you're trying to gain the support of another country, then you want to do everything you can that they would act in a cooperative fashion," he added. "When you announce that you're going to launch an attack into another country, it's pretty obvious that you have the effect that it had in Pakistan: It turns public opinion against us."
Obama fired back: "I want to be very clear about what I said. Nobody called for the invasion of Pakistan. Senator McCain continues to repeat this."
"What I said was the same thing that the audience here today heard me say, which is, if Pakistan is unable or unwilling to hunt down bin Laden and take him out, then we should," he said.
Here's a look back:
After news broke that Osama bin Laden had been killed in Pakistan, Sen. McCain did offer praise for Obama. When asked Monday evening whether President Bush is receiving enough credit for bin Laden's death, McCain said: "I think President Bush is being credit[ed] and he deserved credit, but I also think President Obama and his team deserve great credit as well. President Obama made the decision to go in the way they did and that obviously turned out to be an excellent decision."
Additional reporting by Benjy Sarlin.