Panetta, speaking Tuesday at the Center for a New American Security in Washington, said the terrorist organization still poses a threat beyond Afghanistan and Pakistan, gaining footholds Yemen, Somalia and elsewhere, CNN reported.
He also pledged "everything possible" would be done to ensure an attack similar to the deadly assault on the U.S. Consulate in Benghazi, Libya, won't occur again.
"That means counter-terrorism will continue as a key mission for our military and intelligence professionals as long as violent extremists pose a direct threat to the United States," Panetta said.
Efforts against the core al-Qaida group have largely succeeded, the Defense chief said.
"Al-Qaida's leadership ranks have been decimated," he said.
But al-Qaida and its affiliates "are looking to establish a foothold in other countries in the Middle East and North and West Africa," he said.
The international community and regional partners share U.S. concerns about Mali, where al-Qaida-affiliated groups control the north, Panetta said.
"We are also concerned about Libya, where violent extremists and affiliates of al-Qaida attacked and killed innocent Americans in Benghazi," Panetta said.
Concerning the consulate attack, in which Ambassador Christopher Stevens and three other diplomatic employees died, Panetta said, "Let me be clear: We will work with the Libyan government to bring to justice those who perpetrated these attacks."
Panetta said the solution to defeating al-Qaida's affiliates is through unconventional warfare "outside declared combat zones, using a small-footprint approach that includes precision operations," he said.
"But to truly protect America, we must sustain and in some areas deepen our engagement in the world -- our military, intelligence, diplomatic and development efforts are key to doing that," he said.
Even with the success, Panetta spoke of the terror network as a "cancer," The Hill said.
"Even with these gains, the threat from al-Qaida has not been eliminated," he said. "We have slowed the primary cancer, but we know that the cancer has also metastasized to other parts of the global body."
Panetta emphasized the importance of Afghanistan in the fight against terrorism and spoke of the U.S. commitment to remain in the country after coalition combat forces withdraw in 2014.
"All of this sends a very simple and powerful message to al-Qaida, to the Taliban and to the violent extremist groups who want to regain a safe haven in Afghanistan: We are not going anywhere," Panetta said. "You cannot wait us out."