Key members of President Obama’s national security team are preparing to leave their jobs beginning this summer, forcing the administration to fill several critical posts as it prepares to withdraw U.S. troops from Afghanistan and as turmoil continues in the Middle East.

Among those who have announced the intention to leave or are due to rotate out of existing jobs include Robert M. Gates, the defense secretary; Adm. Mike Mullen, chairman of the joint chiefs of staff; Gen. David H. Petraeus, commander of international forces in Afghanistan; and Karl W. Eikenberry, the U.S. ambassador to Kabul. In some cases, the officials will retire. In others, they will transfer to new roles.

“For a country at war to lose its entire chain of command at the same time, more or less, is an extraordinary and fraught development,” said Michael E. O’Hanlon, a senior fellow at the Brookings Institution. “The good news is that we have some very able people willing to continue in one way or the other.”

The numerous vacancies will give Obama the opportunity to remake the top tier of his national security team for the first time since taking office. How he chooses to do so, whether with big thinkers or more technocratic managers, may signal his priorities as he heads into his campaign for reelection.

Early on, Obama was praised for appearing to value competence above all else in his appointments, notably in his choices of Gates, a vet­eran of Republican administrations, as defense secretary, and Hillary Rodham Clinton, a political rival, as secretary of state. But with some recent vacancies, he has chosen to elevate advisers with whom he feels most comfortable — a pattern that disappoints some analysts hoping for an injection of new ideas.

Multiple national security team members have announced they intend to leave or are due to rotate out of existing jobs, including (from left) Gen. David H. Petraeus, commander of international forces in Afghanistan; Karl W. Eikenberry, the U.S. ambassador to Kabul; and Robert M. Gates, the defense secretary. The three met with Afghan president Hamid Karzai in March. (S. SABAWOON/AFP/GETTY IMAGES)

The new team will be coordinated by national security adviser Thomas E. Donilon, who has been in his job for only six months. White House officials would not comment on the impending changes, but several other officials provided information about internal deliberations on the condition that they not be identified.

The impending departures of Gates and Mullen, both holdovers from the George W. Bush administration, will open the top two defense positions and probably trigger other vacancies.

Gates has declined to pinpoint a departure date. But Pentagon officials expect that he will leave around July, when Obama is scheduled to begin withdrawing the 30,000 additional U.S. troops he deployed to Afghanistan at the end of 2009.

“The secretary made it clear some months ago that he intends to leave the job in Washington in 2011,” said Geoffrey S. Morrell, the Pentagon spokesman. “Sometime this year, he will bow out.”

The leading candidate, according to Pentagon and other sources, is CIA Director Leon Panetta, a vet­eran of Washington who would probably continue the procurement and budget reforms that Gates began.

U.S. officials close to Panetta said he has not been approached, even informally, about the Pentagon job, and stressed that he expected the CIA position to be his last high-level government post. Even so, the officials would not rule out Panetta’s accepting the position. Panetta “isn’t seeking any other job and hasn’t been asked by the president to take on a different role,” CIA spokesman George Little said.

Panetta was a surprise candidate to be CIA director and had to overcome early opposition from senior lawmakers who initially opposed his nomination because he had so little intelligence experience. But Panetta’s influence with the White House and Washington savvy have made him a popular figure at CIA headquarters. At 72, he would be the oldest person to take on the leadership of the Defense Department.

A Pentagon official close to the White House said Navy Secretary Ray Mabus, a former Mississippi governor and ambassador to Saudi Arabia, could be another choice. But Panetta appears to be the favorite.

If he moves to the Pentagon, the CIA director job would open, a post some in the administration say Petraeus would strongly consider taking if asked. He is scheduled to leave his post as commander of the roughly 100,000 U.S. troops in Afghanistan and other international forces this year.

As the regional commander in the Middle East and in Afghanistan, Petraeus has worked to promote cooperation between CIA and military strike teams, but the agency’s critical analyses of the war have sometimes conflicted with Petraeus’s more cautiously optimistic assertions of “fragile and reversible” progress.

“It would give him a chance to fix the problems at the CIA that he has been complaining about for the last several years,” said one person familiar with the White House deliberations.

Petraeus has many supporters in Washington and in Kabul, many of whom are still hopeful that he could succeed Mullen as chairman of the Joint Chiefs. The decision will ultimately be Obama’s to make.

Petraeus’s prominence in Washington and his close relationship with influential lawmakers from both parties have made some in the White House uneasy, particularly political advisers who see him as a potential threat should he run for president, an ambition he has ruled out.

Petraeus has informed the White House that he is willing to serve in his post through November, the end of fighting season in Afghanistan.

Marine Lt. Gen. John R. Allen, deputy commander of the U.S. Central Command, appears to be the favorite to succeed him. Allen is already assembling his staff in preparation for a command transfer that could come within months.

Mullen is expected to retire when his term as chairman of the Joint Chiefs expires in September.

Marine Gen. James E. Cartwright, the vice chairman, is seen by many Pentagon officials as having the inside track to the top job because of his close working relationship with Obama, forged during the 2009 review of Afghan war strategy.

Maj. Cliff W. Gilmore, a spokesman for Cartwright, declined to comment on the general’s future except to say: “He’ll continue to serve at the pleasure of the president.”

Cartwright’s term as vice chairman expires in August, and no clear favorite has emerged to succeed him. But because he is a Marine aviator, the next vice chairman is likely to come from the ranks of ground forces officers, making Gen. Ray Odierno, former commander of U.S. forces in Iraq, a strong candidate for the post.

One indicator of Cartwright’s standing is that his opponents inside the Pentagon have fueled a whisper campaign in recent months in a bid to derail his candidacy. In February, the Pentagon released documents showing that the Defense Department’s inspector general had investigated allegations that Cartwright had a sexual relationship with a subordinate in 2009.

The inspector general found no evidence that Cartwright had any kind of romantic relationship with the female officer, but the general was criticized for failing to discipline the woman, who was found to have behaved in an unprofessional manner after having too much to drink.

Mabus, the Navy secretary, ultimately disregarded the inspector general’s recommendation that administrative action be taken against Cartwright, concluding that he had not acted improperly.

Staff writers Craig Whitlock, Rajiv Chandrasekaran, Greg Miller and Karen DeYoung, in Washington, and Craig Timberg, traveling with Gates, contributed to this report.