Jose A. Rodriguez Jr. is a 31-year veteran of the CIA and the author of “Hard Measures: How Aggressive CIA Actions After 9/11 Saved American Lives.”

As we mark the anniversary of Osama bin Laden’s death, President Obama deserves credit for making the right choice on taking out Public Enemy No. 1.

But his administration never would have had the opportunity to do the right thing had it not been for some extraordinary work during the George W. Bush administration. Much of that work has been denigrated by Obama as unproductive and contrary to American principles.

He is wrong on both counts.

Shortly after bin Laden met his maker last spring, courtesy of U.S. Special Forces and intelligence, the administration proudly announced that when Obama took office, getting bin Laden was made a top priority. Many of us who served in senior counterterrorism positions in the Bush administration were left muttering: “Gee, why didn’t we think of that?”

The truth is that getting bin Laden was the top counterterrorism objective for U.S. intelligence since well before the Sept. 11, 2001, attacks. This administration built on work pain­stakingly pursued for many years before Obama was elected — and without this work, Obama administration officials never would have been in a position to authorize the strike on Abbottabad, Pakistan, that resulted in bin Laden’s overdue death.

In 2004, an al-Qaeda terrorist was captured trying to communicate with Abu Musab al-Zarqawi, the leader of the terror organization’s operations in Iraq. That captured terrorist was taken to a secret CIA prison — or “black site” — where, initially, he was uncooperative. After being subjected to some “enhanced interrogation techniques” — techniques authorized by officials at the most senior levels of the U.S. government and that the Justice Department’s Office of Legal Counsel confirmed were consistent with U.S. law — the detainee became compliant. He was not one of the three al-Qaeda operatives who underwent waterboarding, the harshest of the hard measures.

Once this terrorist decided that non-cooperation was a non-starter, he told us many things — including that bin Laden had given up communicating via telephone, radio or Internet, and depended solely on a single courier who went by “Abu Ahmed al-Kuwaiti.” At the time, I was chief of the CIA’s Counterterrorism Center. The fact that bin Laden was relying on a lone courier was a revelation that told me bin Laden had given up day-to-day control of his organization. You can’t run an operation as large, complex and ambitious as al-Qaeda by communicating only every few months. It also told me that capturing him would be even harder than we had thought.

Armed with the pseudonym of bin Laden’s courier, we pressed on. We asked other detainees in our custody if they had ever heard of “al-Kuwaiti.” Khalid Sheik Mohammed, the mastermind of 9/11, reacted in horror when he heard the name. He backed into his cell and vigorously denied ever hearing of the man. We later intercepted communications KSM sent to fellow detainees at the black site, in which he instructed them: “Tell them nothing about the courier!”

In 2005 another senior detainee, Abu Faraj al-Libi, told us that this courier had informed him that Libi had been selected to be al-Qaeda’s No. 3 official. Surely that kind of information is delivered only by highly placed individuals.

A couple of years later, after I became head of the National Clandestine Service, the CIA was able to discover the true name of the courier. Armed with that information, the agency worked relentlessly to locate that man. Finding him eventually led to tracking down and killing bin Laden.

With some trying to turn bin Laden’s death into a campaign talking point for Obama’s reelection, it is useful to remember that the trail to bin Laden started in a CIA black site — all of which Obama ordered closed, forever, on the second full day of his administration — and stemmed from information obtained from hardened terrorists who agreed to tell us some (but not all) of what they knew after undergoing harsh but legal interrogation methods. Obama banned those methods on Jan. 22, 2009.

This past weekend, Sens. Dianne Feinstein and Carl Levin attacked statements made in May 2011 by me, former CIA director Michael Hayden and former attorney general Michael Mukasey regarding what led to bin Laden’s death. They misunderstood and mischaracterized our positions.

No single tactic, technique or approach led to the successful operation against bin Laden. But those who suggest it was all a result of a fresh approach taken after Jan. 20, 2009, are mistaken.