Panetta said the International Security Assistance Force under Allen's command has severely disrupted militants' efforts to thwart Afghan developments since war began.
"As a direct result of Gen. Allen's superb leadership, the ISAF campaign is on track to achieve the goal of ensuring Afghanistan never again becomes a safe haven for al-Qaeda or its extremist affiliates," Panetta said in a statement.
U.S. forces in 2011 launched a raid in Pakistan that killed al-Qaida leader Osama bin Laden. Al-Qaida since the U.S.-led invasion of Afghanistan in 2001 has evolved to include regional offshoots in North Africa and the Middle East, however.
Allen told the BBC that counterinsurgency campaigns like Afghanistan are difficult to assess in terms of victory.
"I think we have gone a long way to setting the conditions for what, generally, usually, is the defining factor in winning a counter-insurgency -- to set the conditions for governance (and) to set the conditions for economic opportunity," he said.
International forces are to end their Afghan campaign next year.