A year ago, Michael Hayden warned that al-Qaeda had rebounded and presented a critical threat to the United States. Yesterday, he told the Washington Post that AQ and its network had suffered defeats across the board and now faced significantly increased hostility from fellow Muslims. What happened? Three guesses:

Less than a year after his agency warned of new threats from a resurgent al-Qaeda, CIA Director Michael V. Hayden now portrays the terrorist movement as essentially defeated in Iraq and Saudi Arabia and on the defensive throughout much of the rest of the world, including in its presumed haven along the Afghanistan-Pakistan border.

In a strikingly upbeat assessment, the CIA chief cited major gains against al-Qaeda’s allies in the Middle East and an increasingly successful campaign to destabilize the group’s core leadership.

While cautioning that al-Qaeda remains a serious threat, Hayden said Osama bin Laden is losing the battle for hearts and minds in the Islamic world and has largely forfeited his ability to exploit the Iraq war to recruit adherents. Two years ago, a CIA study concluded that the U.S.-led war had become a propaganda and marketing bonanza for al-Qaeda, generating cash donations and legions of volunteers.

All that has changed, Hayden said in an interview with The Washington Post this week that coincided with the start of his third year at the helm of the CIA.

“On balance, we are doing pretty well,” he said, ticking down a list of accomplishments: “Near strategic defeat of al-Qaeda in Iraq. Near strategic defeat for al-Qaeda in Saudi Arabia. Significant setbacks for al-Qaeda globally — and here I’m going to use the word ‘ideologically’ — as a lot of the Islamic world pushes back on their form of Islam,” he said.

This all started with the American surge in Iraq. A year ago, AQI had plenty of reason to brag about its operations in Iraq. The US had not fought back effectively against the terrorist network in the western provinces, and they held significant territory. They had subjugated enough of the area to proclaim a new Caliphate and urge recruits to join them in building the Islamic State of Iraq.

Instead, these recruits found out that AQI held these areas only through terrorizing other Muslims, and unfortunately for them, they arrived just when General David Petraeus brought the new counterinsurgency strategies to Iraq. Bolstered by an additional 30,000 troops, Petraeus began to clear Iraq of the terrorist network, along with new tribal alliances and assistance from more secular insurgent groups who belatedly discovered that the Americans were far more preferable than Osama bin Laden’s lunatics. AQI suffered an unending series of losses to the American military, which led to a far more damaging loss of prestige among Islamists.

The increased pace of attacks on Islamist bases in Pakistan has also helped degrade AQ. Several high-level planners have already met their doom via Predator drones, and the pace indicates that the US has received better intel over the last few months than ever before. As long as the attacks continue, the terrorists will find it difficult to maintain effective communications with its cells in other nations.

These gains could still be lost. Hayden warned against a return to the pre-9/11 mindset, saying that complacency could put us back into the same posture that allowed 9/11 to take place. Just as important, though, is to keep pressure where we have succeeded: in Iraq. A premature withdrawal that allows AQI to reform in western Iraq would certainly boost the flagging fortunes of the Osama network and once again provide a major recruitment point.