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
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.
@placeholder, 72, took over at the CIA in February 2009.