Washington (CNN) -- Leon Panetta, poised to jump between two of Washington's toughest jobs -- from director of the CIA to secretary of defense -- basked in bipartisan praise Thursday.
He spent the day in his confirmation hearing before the Senate Armed Services Committee, first in a public session and then in an afternoon closed-door session to allow discussion of national security secrets.
Senators from both sides of the aisle offered effusive praise for the 72-year-old nominee, who pledged to be a "tireless advocate for our troops and their families."
The word of the day was "continuity," with senators saying Panetta's nomination to succeed Robert Gates at the Pentagon represents an extension of many current policies.
And Panetta said he already has spent hours talking to Gates as well as previous defense secretaries.
He called himself "a creature of the Congress," a shorthand acknowledgement that he understands what is expected of him in the formal give-and-take with senators and is willing to consult with them in coming months. And to reassure congressional critics of the Obama administration, Panetta said he sees no need to choose between frugality and a strong defense.
"I am very aware that we must be highly disciplined in how we spend the taxpayer's precious resources," he said. "I do not believe that we have to choose between strong fiscal discipline and strong national defense. We owe it to our citizens to provide both."
The hearing room was packed, with more than 50 journalists sitting at tables and scores of spectators hoping for a glimpse into how Panetta will guide the Pentagon through an uncertain financial future. Dozens of people stood along the side and back walls of the room.
In a questionnaire Panetta filled out for the committee in advance of the hearing -- 79-pages with 94 questions -- the CIA director held his cards close. There were the big questions about the two wars and references to weapons programs and military benefits. He promised to complete by fall the "comprehensive review" of the $400 billion in proposed cuts President Obama wants to make to national security spending.
But apart from saying that "a smaller budget means difficult choices," there were no details.
Panetta referred to his immigrant parents in his opening statement, saying he would be governed by a saying from his father: "To be free we must be secure."
As the nominee entered the room, Code Pink protesters pushed forward, calling out "Mr. Panetta, will you pledge to bring our troops from Afghanistan?"
When the question of a timetable for Afghanistan withdrawal was posed by the senators, Panetta declined to be specific.
The rate at which troops are withdrawn should be "conditions-based," he said.
He asserted that the United States and its allies have made "great progress" in the nearly decade-long war in Afghanistan, but warned that recent gains are "fragile and reversible."
Greater progress needs to be made, particularly in terms of Afghan self-governance, so that ultimately officials in Kabul "can take responsibility for that country," he added.
The ultimate goal in Afghanistan, he stressed, is to ensure "sufficient stability" in that country so it can never again be a safe haven for al Qaeda or other extremist elements.
Obama administration officials have said U.S. troops will start withdrawing from Afghanistan in July, and that a military handover should be completed in 2014. While the war remains largely unpopular within the United States, conservative critics have complained that a firm withdrawal timeline will undermine U.S. efforts.
In addition to the war in Afghanistan, Panetta's confirmation hearing touched on a wide range of topics, including NATO's engagement in Libya, the U.S. withdrawal from Iraq and the global fight against terrorism.
"This is a time of historic change," Panetta said. "We are no longer in the Cold War. This is the Blizzard War -- a blizzard of challenges that draws speed and intensity from rapidly developing technologies and the rising number of powers on the world stage."
"Despite the times we live in, there is reason to be confident," Panetta told the committee.
The recent raid that killed Osama bin Laden, one that Panetta had operational control over, "has given us the greatest chance since 9/11 to disrupt, dismantle, and defeat al Qaeda permanently. We must keep up the pressure."
But he also warned that global terrorist networks remain "dangerous enemies spread out across the world."
Panetta called the U.S. relationship with Pakistan, the site of bin Laden's hideout, "difficult" but "critical." While Pakistan has proven to be a safe haven for extremists, a positive relationship with authorities in Islamabad is vital to the mission in Afghanistan, he warned.
Close ties with Pakistan are also critical due to the necessity of securing that country's nuclear arsenal, he noted.
On Libya, Panetta expressed optimism that, if NATO operations continue, strongman Moammar Gadhafi will be forced from power.
"We have seen the regime weaken significantly. We have seen the opposition make gains," he said. "I think there are some signs that that if we continue the pressure, if we stick with it, that ultimately Gadhafi will step down."
But he also warned that if Gadhafi survives as leader of Libya it could undermine American credibility.
"I think it impacts on our national security interests in the world if that happens," he said.
The Obama administration has resisted efforts by some in Congress to end or rein in the Libya mission, which started in March.
Sen. Lindsey Graham, R-South Carolina, also asked Panetta if Gadhafi remaining in power would send a message to Iran about not fearing the United States and its opposition to Iran developing nuclear weapons.
"I think it tells them our word isn't worth very much if we aren't willing to stick to it," Panetta said.
Graham drew a chuckle from Panetta when he told the CIA director that he "couldn't agree with you more. I can't wait to vote for you."
Earlier, Graham won a full laugh from Panetta when he was talking about defense contractors who often are paid additional money if the work falls behind schedule. "The longer it takes to develop a weapon and the more it costs, the more the contractor makes," Graham said. "Isn't that kind of stupid?"
Panetta laughed aloud and said, "Not for the contractor, but for the government it is."
"I don't blame the contractor," Graham said. "I blame us."
Graham suggested that private companies pay 25 percent of the development costs for new projects, that all contracts be written with fixed prices and that contractors and the government share in any cost overruns.
"I think that's a suggestion worth looking at," Panetta said.
I think it would save us a lot of money," Graham said.
Panetta agreed, in response to a question from the committee's chairman, Sen. Carl Levin, D-Michigan, that the use of controversial enhanced interrogation techniques such as waterboarding during President George W. Bush's administration "crossed the line."
Panetta also warned of a "strong likelihood" that "the next Pearl Harbor could be a cyber attack."
"We are now the target of increasing attacks that go after our (computer-based) systems," he said.
Panetta, virtually certain to be confirmed, has been described as the consummate Washington insider. He took over at the CIA in February 2009, and previously served as chief of staff to President Bill Clinton between 1994 and 1997. Prior to that, the California Democrat served as director of Clinton's Office of Management and Budget, a position requiring mastery of tricky fiscal situations and an understanding of the federal government's sprawling bureaucracies.
Panetta also served in the House of Representatives from 1977 to 1993, a period in which he established deep congressional ties. His friendships and institutional knowledge of Capitol Hill, observers believe, will be critical in terms of helping to mold congressional opinion and balance Pentagon priorities against growing deficit fears.
If confirmed, Panetta would replace retiring Defense Secretary Robert Gates, who has led the Pentagon since December 2006. President Barack Obama has nominated Gen. David Petraeus, currently head of the NATO International Security Assistance Force and U.S. forces in Afghanistan, to replace Panetta at the CIA.