WASHINGTON -- In a further shake-up of U.S. defense leaders, the Pentagon's second-ranking official said Thursday he intends to resign but has agreed to stay on the job until Defense Secretary Leon Panetta chooses a successor.

Deputy Defense Secretary William J. Lynn III said in an Associated Press interview that he told Panetta last Friday, on Panetta's first day as Pentagon chief, that he planned to resign for personal reasons.

"I thought this was a logical point for me to depart the Pentagon," Lynn said during the interview in his office.

He said he told Panetta that he would be best served by having a deputy who was willing to stay at least through President Barack Obama's first term, which ends in January 2013.

"I did not think I could commit for that type of timeline," he said.

Lynn said he was leaving for "personal, family reasons," and wanted to spend more time with his children. He said it had nothing to do with Obama's choice of CIA director Panetta to succeed Robert Gates. Lynn said he knew Panetta only slightly from periodic contact while both served in the Clinton administration.

"The secretary asked me to stay to ensure a smooth transition" to a new deputy, "and we think that's probably early fall," he said. "I think they'll try to move pretty quickly."

Panetta's chief spokesman, Doug Wilson, said Panetta has begun a search for a deputy. Wilson said it was possible that a nomination could come by the end of the summer.

Loren Thompson, a defense analyst at the Lexington Institute, a think tank, said that among the possible candidates are Michele Flournoy, whom Panetta inherited as his policy chief, and Ashton Carter, the holdover chief of acquisition and technology. Thompson said Flournoy is especially liked by the White House but might lack the managerial experience required to be an effective deputy defense secretary.

Wilson said no other senior Pentagon officials have indicated they intend to leave anytime soon.

The Obama administration is in the midst of a major rejiggering of its national security team, and more changes are coming.

Navy Adm. Mike Mullen, chairman of the Joint Chiefs of Staff for nearly four years, is retiring Oct. 1. The current Army chief, Gen. Martin Dempsey, has been nominated to replace Mullen.

Last week, Marine Lt. Gen. John R. Allen won Senate confirmation to become the top U.S. commander in Afghanistan. He is succeeding Army Gen. David Petraeus, who is retiring from the military to become CIA director.

Lynn, 57, has been the Pentagon's No. 2 official since February 2009. He made his mark by focusing on improving the military's cybersecurity, developing the Pentagon's first energy strategy and overseeing budget planning. He also played an important role in coordinating with the Department of Veterans Affairs on veterans' services.

The Pentagon's cyberstrategy is to be announced next week. The AP has reported that the strategy will lay out some of the capabilities the military may use during peacetime and conflict.

They range from planting a computer virus to using cyberattacks to bring down an enemy's electrical grid or defense network.

Lynn also was a champion of preserving access for U.S. troops to social media tools, even as some in the Pentagon sought to clamp down for security reasons.

In the AP interview, Lynn said his successor's biggest challenge will be managing further cuts to the defense budget while preserving military strength. Obama last spring ordered the Pentagon to come up with $400 billion in new cuts over the coming decade, and Lynn has been heading an internal review of how to do that.

"You have to recognize there is a strong need for priorities," he said. "You can't protect just a little bit of everything. You're going to have to make some cleaner choices, eliminate some capabilities" and reduce the size of the military.

Traditionally, the deputy defense secretary is the day-to-day operator of internal Pentagon business, including budget oversight and management of the complex issues related to building and buying new weapons. Left to the defense secretary are more high-profile issues such as managing wars and dealing with the White House and Congress.

The deputy rarely is elevated to the top job. The last to take that step was William J. Perry, who moved from the deputy post to be Clinton's second defense secretary in February 1994.