Washington (CNN) -- In the most extensive reshaping of the Obama administration's national security team to date, the president will name Central Intelligence Agency Director Leon Panetta as his nominee to succeed Robert Gates as defense secretary, top U.S. officials said Wednesday. Gen. David Petraeus will be nominated to take over as CIA director, and Lt. Gen. John Allen will succeed Petraeus as head of the U.S-led international military force in Afghanistan, a senior administration official told reporters. In addition, longtime diplomat Ryan Crocker will be nominated as the next U.S. ambassador to Afghanistan, the official said. President Barack Obama will formally announce the changes on Thursday, according to the senior administration official. It is the biggest reshaping of Obama's national security team since he took office in January 2009 and reflects a longstanding plan by Gates to step aside this year.
@highlight
NEW: Petraeus to resign from military once confirmed, sources say
@highlight
It took a meeting with Obama to convince Panetta to take the job, a source says
@highlight
Petraeus will be nominated as CIA chief
@highlight
It is the most extensive reshaping of Obama's national security team to date
David Petraeus
Petraeus
Petraeus
Petraeus
In addition, @placeholder will resign from the military once confirmed so that he serves as a civilian CIA director, officials said.
Leon Panetta
Panetta
Gates was telling legislators and staff members that he recommended Panetta for his job six months ago, and joked that @placeholder stopped speaking to him for days for doing so, the officials said.
Leon Panetta
Panetta
@placeholder has been happy serving at the CIA, but "believes strongly in public service and answering the call from the commander-in-chief," the source said.
Leon Panetta
Panetta
@placeholder, 72, took over at the CIA in February 2009.
Obama
Barack Obama
Obama
Obama
Obama
Berteau said the president's choice of Petraeus to lead the CIA indicates that @placeholder is interested in his national security views and efforts and it "indicates that the president cares about the way all those pieces fit together."
David Petraeus
Petraeus
Petraeus
Petraeus
Earlier this month, @placeholder took a highly unusual step for a military officer when he publicly acknowledged the possibility of being in contention for a presidential appointment.
Obama
Barack Obama
Obama
Obama
Obama
"I spent a long time hoping the question would never be popped," Gates admitted the day after @placeholder announced his nomination.