WASHINGTON - Leon E. Panetta, President Obama's choice to head the Pentagon, predicted Thursday that Iraq would ask the United States to keep some American forces in that country beyond year's end, the current departure date.

In wide-ranging testimony at his Senate confirmation hearing, the current CIA director and former Clinton White House budget chief parried questions on wars in Afghanistan, Iraq, and Libya, and addressed concerns that financial pressures will mean deep defense cuts.

Panetta said that Moammar Gadhafi's rule in Libya was weakening and that Pakistan was a frustrating but crucial ally in the terrorism fight. He offered few specifics on how many of the 100,000 U.S. troops in Afghanistan should be withdrawn beginning in July. He concurred with Obama's promise of a significant drawdown but also said the decision should be "conditions-based."

After the latest violence in Iraq, Panetta said he expected Baghdad to ask for U.S. troops to stay beyond their scheduled Dec. 31 departure. There are about 47,000 U.S. troops in Iraq, none in a declared combat role.

"I think it's clear to me that Iraq is considering the possibility of making a request for some kind of presence to remain there," Panetta said, adding that it was contingent on what Prime Minister Nouri al-Maliki requests. "I have every confidence that a request like that is something that I think will be forthcoming at some point."

Panetta told the Senate Armed Services Committee that there were about 1,000 al-Qaeda insurgents in Iraq and that the situation was fragile. "I believe that we should take whatever steps are necessary to make sure that we protect whatever progress we've made there," he said.

On a glide path to confirmation, Panetta would replace Gates, who is retiring June 30 after 41/2 years in the Bush and Obama administrations.

A California Democrat, the 72-year-old Panetta was head of the House Budget Committee, served as President Bill Clinton's chief of staff and budget director, and led the CIA for the last two years.

He received effusive praise from the senators, based in part on the CIA's role in the raid and killing of al-Qaeda leader Osama bin Laden.