After stepping down as CIA director, Panetta officially took office in a private ceremony July 1, but Vice President Joe Biden administered the formal public oath at the Pentagon Friday, the Defense Department said.
He told the audience, including members of Congress: "I want to first begin by thanking the president for placing his trust and his confidence in me. I am truly humbled by the responsibility and the opportunity that has been given to me at this great moment in time."
He said he would keep working with Congress to strengthen the Defense Department's mission. He also pledged to work with members of both major political parties.
"I can't do this job without you," Panetta said. "It's that simple. I really believe that Congress has to be a full partner in the department's mission of protecting America."
Panetta thanked the military's leadership for its support, especially Navy Adm. Mike Mullen, chairman of the Joint Chiefs of Staff.
Panetta also expressed his confidence in the U.S. military.
As for terrorists, Panetta said: "No one attacks the United States of America and gets away with it. We have been relentless in the efforts to disrupt, dismantle and defeat al-Qaida and al-Qaida's extremist affiliates. ... I believe that we are within reach of achieving a strategic defeat of al-Qaida. But to do that we have to continue to put pressure on them where ever they are. And if we continue that commitment, then ultimately, we will succeed."