President Barack Obama is nominating longtime Pentagon official Eric Fanning to be the Army's new secretary. If confirmed, Fanning, a civilian, would be the nation's first openly gay leader of a military service.

The nomination comes at a time when the Obama administration is working to eliminate barriers to military service based on sexuality or gender. The “don’t ask, don’t tell” policy that allowed homosexuals to serve in the military as long as they hid their sexuality was officially repealed during Obama’s first term. Gays are now allowed to openly serve.

In the meantime, women have been crossing traditional barriers in the military, as well. Two women competed for and earned their Army Ranger tabs this summer for the first time in history. On Friday, the Marines announced they would open armored units to women, but would seek to keep several front-line combat jobs – infantry and artillery -- closed, a senior military official told Fox News.That would buck the trend being followed by the other three military services.

Fanning, 47, became the Army's acting undersecretary in July. Before that, he served as Defense Secretary Ash Carter’s chief of staff, and the undersecretary and acting secretary of the Air Force. Obama said in a statement Friday that Fanning brings years of experience and leadership to the role, and that he's confident Fanning will lead U.S. soldiers with distinction.

Before joining the administration, Fanning served as Deputy Director of the Commission on the Prevention of Weapons of Mass Destruction Proliferation and Terrorism. He began his career in public service in 1996, serving in political affairs in the Clinton White House.

Fanning's nomination must be confirmed by the Senate. He would replace John McHugh, who has said he plans to step down no later than November 1.

The news of Fanning's appointment quickly spread on social media  such as Twitter, with many calling the move “historic.”

“Proud of my friend Eric Fanning who will make history, again! Obama nominates 1st gay service secretary to lead Army,” tweeted USAID official Clay Doherty.

Labor Secretary Tom Perez also chimed in: “Congrats to Eric Fanning on being nominated Secretary of the Army! I look forward to our continued work together.”

The Associated Press contributed to this report