Correction: An earlier version of this article incorrectly said that Ryan C. Crocker, the new nominee to be U.S. ambassador to Afghanistan, had been awarded the Presidential Medal of Freedom by President Obama. President George W. Bush awarded Crocker the medal. This version has been corrected.

President Obama is expected this week to nominate Gen. David H. Petraeus to replace Leon Panetta as CIA director and to name Panetta as secretary of defense, U.S. officials said Wednesday, part of a long-anticipated shakeup of his national security team.

Petraeus, currently commander of the U.S.-led coalition in Afghanistan, is expected to be in Washington this week, said an official, who insisted on anonymity because of the sensitivity of the matter. The last military general to serve as CIA director was Michael V. Hayden, who led the agency from 2006 to 2009.

Panetta would replace Defense Secretary Robert M. Gates, who has said he plans to step down this year. The last time the head of the CIA left that position to become secretary of defense was 40 years ago, when Director James R. Schlesinger moved to the Pentagon. Panetta, 72, would be the oldest incoming secretary of defense.

Obama is also expected to announce a new ambassador to Afghanistan, according to administration officials familiar with internal deliberations. Ryan C. Crocker, a five-time ambassador who retired in 2009 after wartime service in Iraq, is likely to be named to that position, officials said.

The move would briefly reunite him with Petraeus, who headed U.S. forces in Iraq during Crocker’s tenure there.

The expected shake-up of President Obama’s national security team could mark the reunion of Ryan C. Crocker, right, and Gen. David H. Petraeus. (James M. Thresher/THE WASHINGTON POST)

A White House spokesman declined to comment on what he said were “personnel” matters. Senior congressional aides said the administration has not informed national-security-related committees of any firm decisions.

Gates’s departure this year has been widely discussed, including by the defense secretary himself. The question facing the White House has been whether to announce a series of related changes all at once or space them out over a period of months.

According to Pentagon sources and others, Panetta emerged as the leading candidate to replace Gates in part because of his 40 years of broad experience throughout the government. As head of the Office of Management and Budget in the Clinton administration, Panetta helped negotiate the 1993 budget bill, and he is seen as likely to continue the defense procurement and budget reforms Gates has begun.

Petraeus, who in Afghanistan has continued the close collaboration with the CIA that he began in Iraq, emerged last month as a contender for the CIA director’s job and indicated that he was interested. Marine Lt. Gen. John R. Allen, deputy of the U.S. Central Command, is likely to succeed Petraeus as commander of U.S., NATO and coalition forces in Afghanistan, officials said.

This year’s turnover will also include Adm. Mike Mullen, chairman of the Joint Chiefs of Staff, whose second two-year term ends in September. But officials said that position is unlikely to be included in this week’s announcements.

The changes come at a crucial moment for Obama’s foreign policy: amid turmoil in North Africa and the Middle East, a U.S. troop withdrawal from Iraq by the end of the year and what the administration has described as a make-or-break summer in Afghanistan.

Crocker and Petraeus were widely hailed as a “dream team” that turned around the Iraq war beginning in 2007, when President George W. Bush ordered a “surge” in U.S. forces as that country spiraled into sectarian civil strife. Both men have many supporters in Washington.

But the Obama administration — which kept Gates, a Bush appointee, at the Pentagon even as it criticized Bush’s handling of the wars in Iraq and Afghanistan — has been reluctant to appear to be further duplicating the Bush team.

While long lists have circulated with possible replacements for Gates and Mullen, finding a new ambassador for Afghanistan has been one of the administration’s most difficult tasks. Retired Lt. Gen. Karl W. Eikenberry, the current ambassador, is unpopular with the State Department and has frequently been at odds with the government of Afghan President Hamid Karzai.

Crocker’s name has been floated for virtually every senior diplomatic position dealing with the Arab world and South Asia. His likely appointment as ambassador to Afghanistan was reported Tuesday by the Associated Press.

Before serving in Iraq, he was U.S. ambassador to Pakistan from 2004 to 2007 and was a senior State Department official on Middle East issues during Bush’s first term. In 2002, he was sent to Afghanistan to reopen the American Embassy in Kabul after the Taliban was ousted.

Crocker also served as ambassador to Syria from 1998 to 2001, to Kuwait from 1994 to 1997 and to Lebanon from 1990 to 1993. Bush awarded him the Presidential Medal of Freedom, the nation’s highest civilian award, in 2009 when he retired to become dean of the Bush School of Government and Public Service at Texas A&M University — a position once held by Gates.