WASHINGTON — The Aerospace Industries Association announced Monday that former U.S. Army Secretary Eric Fanning will become its president and CEO, effective Jan. 1, 2018.

Fanning, 49, was the first openly gay man to hold an armed service’s top civilian position and the only person to have held senior appointments in all three military departments and the Office of the Secretary of Defense.

Fanning will lead the trade association for more than 300 manufacturers of civil and military hardware as it nears its hundredth year, in 2020. Defense and aerospace companies rank as the nation’s second-largest net exporter and one of the biggest contributors to the United States’ annual gross domestic product, with $872 billion in sales in 2016.

Fanning replaces former Excelis CEO David Melcher, who has served as AIA’s president and CEO since June 2015. AIA announced in July that Melcher would aid the recruitment effort before his retirement at the end of the year.

“Eric is an accomplished, respected leader whose broad government and national security experience will serve AIA and its member companies well,” AIA Chairman Dennis Muilenburg, who is also Boeing‘s chairman, president and CEO, said in AIA’s announcement.

“Building on the significant progress made under Dave Melcher’s leadership, Eric will strengthen AIA’s position as the voice of the aerospace and defense industry, bringing continued attention and advocacy to key issues affecting civil aviation, space and defense. We owe Dave our enduring gratitude for his tireless advocacy and many contributions to our industry,” Muilenburg said.

Fanning said the defense industry faces a “dynamic environment,” adding that he was proud to lead AIA at “an exciting time.”

“The aerospace and defense industry is at the forefront of some of America’s greatest challenges and opportunities. For us to continue leading the world demands strong leadership in foreign policy and national security, stable budgets, a vibrant economy where everyone has the opportunity to live the American dream, and the prosperity to create a skilled workforce capable of taking advantage of good-paying jobs that support families and communities,” Fanning said.

“As we navigate this dynamic environment, our nation expects that we will properly equip our forces and allies, ensure safety in commercial aviation, and build an environment that inspires space travel and the minds that create it,” Fanning said.

“The aerospace and defense industry represents more than 2.4 million proud workers, representing over 13 percent of the nation’s manufacturing force from all 50 states, who passionately understand the gravity of their contribution to our economy and national security,” he added.

Fanning served as chief of staff of the secretary of defense, acting secretary of the Air Force, undersecretary of the Air Force, and deputy undersecretary and deputy chief management officer of the Navy. He also served on the staff of the House Armed Services Committee.

There was an eight-month holdup after President Barack Obama nominated Fanning to the top civilian job in the Army, as Sen. Pat Roberts, R-Kan., sought assurances from the Obama administration that detainees at the military’s Guantanamo Bay, Cuba, prison would not be relocated to his home state.