"If you're a transgender service member anywhere in the world, you are very nervous about what you're hearing," Eric Fanning said

Receive the latest national-international updates in your inbox

File Photo—Acting U.S. Secretary of the Army Eric Fanning testifies during his confirmation hearing January 21, 2016 on Capitol Hill in Washington, DC. If confirmed, Fanning will become the first openly gay Army Secretary.

A former Army secretary said Thursday that he's angry and shocked that President Donald Trump would — in his words — "turn his back on thousands of transgender Americans serving today."

Eric Fanning served under President Barack Obama and was the first openly gay head of any military service.

Trump took to Twitter on Wednesday to declare a ban on transgender troops serving anywhere in the U.S.

Fanning told the "Today" show: "If you're a transgender service member anywhere in the world, you are very nervous about what you're hearing, and now you're probably very confused and very frightened about what the future holds for you, when your commander in chief tweets a message like this, essentially dismissing your service."