During the 2004 presidential campaign, John Kerry was widely ridiculed when, in discussing Iraq and Afghanistan war funding, he declared, “I actually did vote for [it] before I voted against it.”

Well, now 50 House Republicans can say the same thing about their votes on the National Security Agency’s (NSA) terrorist surveillance program.

Just over two years ago, on May 26, 2011, the House passed the 2011 Patriot Sunset Extension Act, which specifically reauthorized Section 215, the provision that underlies the NSA’s telephone metadata program. The House approved the bill by a comfortable 97-vote margin, with almost the entire GOP caucus — 196 Republicans — voting in favor.

Last week, it was a very different story when the House voted down an amendment by Rep. Justin Amash (R-Mich.) that would have killed this vital intelligence program. The program survived by just seven votes. What changed? This time around 94 House Republicans voted against the NSA program — including 50 who had voted to authorize the exact same program two years before.

They voted for it before they voted against it.

It is not as if they did not know what they were voting for back in 2011. Every member of Congress was offered a briefing back in 2011 — both in person and on paper — on the classified details of the telephone metadata program. As CNN’s Jake Tapper recently reported, “All House members were invited to be briefed on Section 215 of the Patriot Act, including principal-level briefings for the House Republican and House Democratic Caucus briefings in May 2011.” Members were also given access to classified white papers about the telephone metadata by then-House Intelligence Committee Chairman Silvestre Reyes (D-Tex.). As one NSA official told me, “Members and staff had multiple opportunities to be briefed on the program by intelligence community officials.”

The fact is, they were right the first time. The NSA asked Congress to approve the telephone metadata program in order to close a specific gap in our intelligence capabilities — one that made the 9/11 attacks possible. In the summer of 2001, the NSA had intercepted calls from two of the 9/11 hijackers — Nawaf al-Hazmi and Khalid al-Mihdhar — to an al-Qaeda safe house in the Middle East whose communications were being monitored. However, because the NSA did not have access to metadata on U.S. telephone calls, intelligence officials had no way to know that the two hijackers were in the United States and that their calls had originated in San Diego. As former NSA director Mike Hayden recently pointed out, “If the metadata program had been in effect in the summer of 2001, al-Hazmi and al-Mihdhar would likely have been rolled up, the plane that hit the Pentagon would not have had these jihadists available for the hijacking, and the entire 9/11 enterprise might have been scrapped by al-Qaeda.”

Had the Amash amendment succeeded, it would have put the NSA right back where it was on Sept. 10, 2001. Amazingly, 40 percent of House Republicans voted to do just that.

It’s understandable that Americans without access to classified briefings are confused about what the NSA is and is not doing, but flip-flopping members of Congress have no such excuses. They know full well that NSA leaker Edward Snowden’s claim that he “had the authorities to wiretap anyone, from you or your accountant, to a federal judge, to even the president,” is patently false — he had neither the authority nor the ability to do what he claimed. They know that unless someone in the United States is calling a terrorist, the NSA is not looking at that person’s telephone business records, much less the content of his or her communications. They know the program is operated under the supervision of federal judges who have approved the NSA’s acquisition of such data every 90 days since 2006 and have imposed strict limitations how the data may be accessed and used.

They know all this — yet they voted to kill the program anyway.

After 9/11, the House and Senate intelligence committees conducted a joint inquiry into the intelligence failures that led to the attacks. They concluded that one of the main culprits was the “NSA’s cautious approach to any collection of intelligence relating to activity in the United States.” Now, after a dozen years without an attack on the homeland, they are being accused of the opposite offense.

When terrorist attacks succeed, members of Congress are the first to demand that intelligence officials explain why they failed to “connect the dots.” Well, if Congress ends the metadata program, those intelligence officials will have a simple answer: because you took away the field of dots.

Ann Telnaes animation: Eric Holder writes to Vladi­mir Putin. (Ann Telnaes/The Washington Post)

Read more from Marc Thiessen’s archive, follow him on Twitter or subscribe to his updates on Facebook.