WASHINGTON — President Barack 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 U.S. 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 Petraeus, who resigned Friday because of an extramarital affair with the author of a flattering book about his military career, provided 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 — 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 Sunday, of the depth of the relationships the retired general had nurtured throughout a long military career in the region, which 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 Petraeus’ 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 CIA’s influence in Washington was growing considerably.

Its covert drone program became Obama’s weapon of choice to attack al-Qaida in the tribal areas of Pakistan. And a special unit of the agency became responsible for an attack on Iran’s nuclear complex that was referred to as ‘‘Olympic Games,’’ the first use of U.S. cyberweapons against another state. Increased use of CIA 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.

Petraeus, by his own account, was initially an uneasy fit at the agency, but later became accustomed to its non-hierarchical structure. ‘‘The CIA, thanks to its seasoned and highly educated work force, does not need a heavy hand on the reins,’’ Petraeus said in a speech in September. ‘‘A light touch is generally all that is required.’’

Several current and former officials of U.S. intelligence agencies said they believed that Obama might move quickly to nominate Petraeus’ deputy, Michael J. Morell, as his replacement. That would put the agency’s most respected intelligence analyst at the head of the organization. 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 U.S. intelligence infrastructure from his basement office in the West Wing of the White House: John O. Brennan, a retired CIA operative who once headed the agency’s station in Saudi Arabia.

By all accounts, both Brennan and Morell have developed strong relationships with 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 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 policymaking.

Morell is a soft-spoken onetime intelligence analyst. For a long while he was President George W. Bush’s intelligence briefer; he was omnipresent in the White House after the Sept. 11, 2001, attacks, and frequently could be spotted at a Starbucks in Waco, Texas, near Bush’s home, sipping his coffee between briefings.

Michael V. Hayden, the CIA director who promoted 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 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,’’ Hayden said.

Brennan would be more controversial. He was considered for the job four years ago, when 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 CIA director from 1997 to 2004. Similar accusations have dogged many other agency veterans.

Bruce Riedel, who worked for 30 years at the CIA and is now at the Brookings Institution, said he thought Brennan would be at the top of the list of candidates to replace Petraeus.

‘’He’s got the president’s confidence,’’ Riedel said. ‘‘He knows as much about intelligence as anyone I know.’’ Reidel said he thought the claims of support or tolerance for torture that had blocked 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, 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 CIA director, he would be reporting to Clapper, but his personal relationship with 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 CIA 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.

Rep. Mike Rogers, R-Mich., is chairman of the House Intelligence Committee and a former FBI official and could sail through confirmation hearings and give a bipartisan air to the administration’s efforts, as Petraeus did. So could Michael E. Leiter, the retired head of the national counterterrorism center, who has often challenged the intelligence world’s orthodoxies.