The top two officials at the Defense Intelligence Agency said Wednesday that they will retire from those positions in the coming months, part of a leadership shake-up at an agency that is under pressure to trim budgets and shift focus after more than a decade of war, current and former U.S. officials said.

Lt. Gen. Michael T. Flynn is expected to end his tenure as DIA director this summer, about a year before he was scheduled to depart, according to officials who said Flynn faced pressure from Director of National Intelligence James R. Clapper Jr. and others in recent months. His deputy, David Shedd, had been in his job since 2010.

The moves come at a time when the DIA is in the midst of major changes, including an effort by senior Pentagon officials to expand the agency’s network of spies overseas, improve collection on unfolding crises such as the one in Ukraine, and work more closely with the CIA.

The Pentagon press secretary, John Kirby, said that their retirements “have been planned for some time” and that Defense Secretary Chuck Hagel “appreciates the service of these two dedicated and professional leaders.”

Kirby did not indicate when Flynn and Shedd would step down. Lt. Gen. Mary A. Legere, the Army’s top intelligence officer, is considered a leading candidate to replace Flynn, and she would be the first female DIA director if nominated and confirmed.

Lt. Gen. Michael Flynn. (DIA Public Affairs)

Flynn, who served as a top intelligence adviser to Gen. Stanley McChrystal in Iraq and Afghanistan, arrived at the DIA in July 2012 vowing to accelerate the agency’s overhaul. Asked after a public speech how he would treat employees reluctant to embrace his agenda, Flynn said he would “move them or fire them.”

He drafted a blueprint that called for sending more employees overseas, being more responsive to regional U.S. military commanders, and turning analysts’ attention from the war zones of Iraq and Afghanistan to a broader array of emerging national security threats.

“I think that Flynn’s efforts to move the organization into a role supporting combatant commanders was spot on and it is where DIA should be heading,” said Fred Kagan, a military historian and unpaid adviser to the DIA. “I think that he was trying to introduce a lot of valuable innovation into the organization.”

Critics said that his management style could be chaotic and that the scope of his plans met resistance from both superiors and subordinates. At the same time, his tenure was marked by significant turbulence, including the fallout from the classified intelligence files leaked by former intelligence contractor Edward Snowden, as well as other emerging crises.

“His vision in DIA was seen as disruptive,” said a former Pentagon official who worked closely with Flynn. At the DIA, Flynn sought to push DIA analysts and operators “up and out of their cubicles into the field to support war fighters or high-intensity operations,” the former official said. “I’m not sure DIA sees itself as that.”

Flynn clashed with other high-ranking officials, including Undersecretary of Defense for Intelligence Michael G. Vickers. Officials said Flynn had opposed Vickers’ efforts to make significant cuts to large intelligence centers established to support the U.S. military’s regional overseas commands. A former CIA operative, Vickers has sought to model the DIA’s training and overseas presence more closely on its civilian counterpart, according to current and former U.S. officials.

The plan has encountered significant opposition on Capitol Hill, particularly from members of the Senate Armed Services Committee who have voiced concern over the cost of creating the Defense Clandestine Service, and questioned whether Pentagon spies would end up being used to fill intelligence gaps that are supposed to be handled by the CIA.

Flynn’s departure, which has been rumored for weeks, was set in motion earlier this year when Clapper informed him that the administration had concluded that a leadership change was necessary, officials said. Others described it as a mutual agreement that Flynn would step down.

Flynn was a key player in U.S. military efforts to dismantle insurgent networks in Iraq and Afghanistan, an approach that relied heavily on combining U.S. Special Operations forces with intelligence operatives and analysts.

With McChrystal, Flynn helped to compress a cycle of carrying out raids and then exploiting the intelligence from those operations to find other targets.

In 2010, Flynn rankled many of his counterparts in the intelligence community when he published an article that was sharply critical of the information that spy agencies were assembling in Afghanistan. The effort was so focused on tracking insurgents that U.S. military and diplomatic leaders got little to help them understand the political, economic and cultural issues driving the insurgency.