WASHINGTON — President Barack Obama, in a historic first for the Pentagon, has chosen to nominate Eric Fanning to lead the Army, a move that would make him the first openly gay civilian secretary of one of the military services.

Fanning’s nomination is the latest in a series of actions taken by the administration to advance the rights of gays and lesbians throughout the federal government. The Obama administration has overhauled internal policies to provide benefits to same-sex partners, appointed gay and lesbian to the executive branch and the federal bench and ended the 18-year ban on gays serving openly in the military.

Fanning, who must still be confirmed by the Senate, has been a specialist on defense and national security issues for more than 25 years in the Congress and the Pentagon. As Army secretary he will be partnered with Gen. Mark Milley, who took over as the Army’s top general in August. Together the two men will assume responsibility for the Pentagon’s largest and most troubled service.

“Eric brings many years of proven experience and exceptional leadership to this new role,” Obama said in a statement. “I look forward to working with Eric to keep our Army the very best in the world.”

The Army, which swelled to about 570,000 active duty troops, has shed about 80,0000 soldiers from its ranks in recent years and plans to cut 40,000 more over the next few years. Those planned cuts would shrink the service to its smallest size of the post-World War II era.

Battered by the wars in Iraq and Afghanistan, the Army has had to deal with a spike in suicides as the wars drew to an end and has struggled at times to provide war wounded with the care they need to heal.

Recently, the Army’s outgoing top officer, Gen. Ray Odierno, said that tight budgets and the ongoing strain of 14 years of war had badly degraded the Army’s readiness to fight and that only one-third of its brigades were prepared to deploy to a war zone, the lowest readiness rate in decades.

Fanning’s role as Army secretary will give him influence over the generals the Army selects to rebuild the service after a long stretch of counterinsurgency wars in which soldiers dismounted from their tanks and armored vehicles and found themselves leading foot patrols through remote villages.

Fanning has served at senior levels in both the Air Force and the Navy, where he oversaw the development of major weapons programs. He has been acting undersecretary of the Army since June 2015.

Fanning will play a key role in helping the Army, which has struggled to field new combat systems amid the strain of fighting two wars, to upgrade aging tanks, armored personnel carriers and helicopters. Since 2000 the Army has been forced to cancel virtually all of its major new weapons programs because they ran over budget or didn’t perform as expected.

New equipment for the wars in Iraq and Afghanistan, like special armored vehicles designed to resist blasts from roadside bombs, had to be developed outside of the traditional procurement channels.

“Eric is taking over at a critical time for the Army,” said Rudy deLeon, who was the deputy secretary of defense during the Clinton administration. “The Army is still living off equipment from the Reagan years. … Eric knows what works and what doesn’t work in the Pentagon.