WASHINGTON -- President Obama has begun searching for a new Central Intelligence Agency director at what many administration officials say is an especially awkward time: in the midst of investigations about the killing of the American ambassador in Benghazi, Libya; at a crucial moment in the covert war against Iran; and just as the administration is considering a more active role in Syria.
In each of those arenas, David H. Petraeus, who resigned on Friday because of an extramarital affair with the author of a highly flattering book about his military career, provided Mr. Obama with both experience and political cover. A hero among Republicans for his service in Iraq and Afghanistan -- and his occasional public disagreements with the president over troop withdrawals -- Mr. Petraeus had just returned from a long trip to Libya and the Middle East when news of the scandal broke.
The trip was a reminder, one senior administration official said on Sunday, of the depth of the relationships the retired general had nurtured throughout a long military career in the region, which Mr. Obama was relying on.
"He's pretty critical to everything we've got on the table," the official said. "At a moment when there is about to be a lot of turnover, Petraeus was going to be a source of stability."
Even before Mr. Petraeus's arrival at the intelligence agency, where he redecorated the director's suite with guns and other memorabilia from his days in Iraq and Afghanistan, the C.I.A.'s influence in Washington was growing considerably.
Its covert drone program became Mr. Obama's weapon of choice to attack Al Qaeda in the tribal areas of Pakistan. And the agency became responsible for the broad attacks on Iran's nuclear complex code-named "Olympic Games," which included the first use of American cyberweapons against another state. Increased use of C.I.A. paramilitary forces brought the agency closer than any time in decades to its roots, in the clandestine operations run by the Office of Strategic Services in World War II.
Mr. Petraeus, by his own account, was initially an uneasy fit at the agency, but later became accustomed to its non-hierarchical structure. "The C.I.A., thanks to its seasoned and highly educated work force, does not need a heavy hand on the reins," Mr. Petraeus said in a speech in September. "A light touch is generally all that is required."
Several current and former officials of American intelligence agencies said they believed that Mr. Obama might move quickly to nominate Mr. Petraeus's deputy, Michael J. Morell, as his replacement. That would put the agency's most respected intelligence analyst at the head of the organization. Mr. Morell is of the "light touch" school, and clearly the favorite inside the headquarters of the agency in Langley, Va.
The president could also choose the man inside the White House who is considered by many to be overseeing the entire American intelligence infrastructure from his basement office in the West Wing of the White House: John O. Brennan, a retired C.I.A. operative who once headed the agency's station in Saudi Arabia.
By all accounts, both Mr. Brennan and Mr. Morell have developed strong relationships with Mr. Obama over the past four years; both were central players in the operation to find and kill Osama bin Laden, and both have been at the core of the covert program to undermine Iran's nuclear program.
They would be, in the words of one former official who has worked with them both, "comfortable choices for a president who has had his differences" with a sprawling intelligence apparatus that Mr. Obama has said was often too slow to give him what he needed in his first term, and at other times went beyond its role to try to affect policy making.
Mr. Morell is a soft-spoken onetime intelligence analyst. He was President George W. Bush's intelligence briefer, and he was omnipresent in the White House after the Sept. 11, 2001, attacks. He frequently could be spotted at a Starbucks in Waco, Texas, near Mr. Bush's ranch, sipping his coffee between briefings.
Michael V. Hayden, the C.I.A. director who promoted Mr. Morell to chief of the analytic branch, the directorate of intelligence, said on Sunday that "that was the job of his dreams."
But he made the switch to the Obama administration seamlessly, and, with Mr. Petraeus on the road frequently, was a near-constant presence in the White House Situation Room. "He would be a steady-as-you-go choice," Mr. Hayden said.
Mr. Brennan would be more controversial. He was considered for the job four years ago, when Mr. Obama was first elected. But he withdrew when some human rights advocates accused him -- unfairly, he said -- of supporting or tolerating the use of torture while he was a top aide to George J. Tenet, the C.I.A. director from 1997 to 2004. Similar accusations have dogged many other agency veterans.
Bruce Riedel, who worked for 30 years at the C.I.A. and is now at the Brookings Institution, said he thought Mr. Brennan would be at the top of the list of candidates to replace Mr. Petraeus.
"He's got the president's confidence," Mr. Riedel said. "He knows as much about intelligence as anyone I know." Mr. Reidel said he thought the claims of support or tolerance for torture that had blocked Mr. Brennan's way before would probably not be an obstacle any longer. "After four years, no one doubts John's determination and ability to fight terrorism without using torture," he said.
But by many measures, Mr. Brennan is already effectively the most senior intelligence official in Washington; some say he even overshadows the director of national intelligence, James R. Clapper Jr. As C.I.A. director, he would be reporting to Mr. Clapper, but his personal relationship with Mr. Obama might test that reporting structure.
There are a range of other choices, officials said. One is to attempt to install the current national security adviser, Thomas E. Donilon, who has been deeply involved in a range of covert programs and has frequently described himself as one of the country's best-informed intelligence officials.
But again, he might view the C.I.A. job as something of a demotion; currently, he is overseeing the administration's biggest geopolitical initiatives from his corner office at the White House. He could also face confirmation difficulties, dating back to his days as a senior executive at Fannie Mae, the troubled government-sponsored mortgage financing agency that is now a ward of the Treasury Department.
Representative Mike Rogers, Republican of Michigan, is chairman of the House Intelligence Committee and a former F.B.I. official and could sail through confirmation hearings and give a bipartisan air to the administration's efforts, as Mr. Petraeus did. So could Michael E. Leiter, the retired director of the National Counterterrorism Center, who has often challenged the intelligence world's orthodoxies.
Scott Shane contributed reporting.
Correction: November 12, 2012, Monday
This article has been revised to reflect the following correction: An earlier version of this article misstated the name of the C.I.A.'s World War II-era predecessor. It was the Office of Strategic Services, not the Office of Secret Services.
This article originally appeared in The New York Times.