For 20 years, Sue Robbins and Angie Rice served their country in silence.

Robbins was a tank gunner and satellite communications specialist in the U.S. Army; Rice a Navy pilot.

Neither was able to live or serve openly as a transgender woman, as both do now.

On Wednesday, the two women said they were left stunned by the news that President Donald Trump had ordered the reinstatement of policies that had barred transgender people from serving openly in all branches of the military.

"I am in mourning," Rice, now a special-needs teacher in the Weber County School District, said Wednesday. "Not just for everyone like me who served in silence but for every trans person who is serving now."

Trump announced on Twitter the decision to ban transgender people from military service "in any capacity," citing "tremendous medical costs and disruption."

In a second tweet, the president said he had consulted with "generals and military" experts in making the decision.

"Our military must be focused on decisive and overwhelming victory and cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail," he added.

At the Pentagon, members of the staff of Defense Secretary Jim Mattis appeared to have been caught unaware by Trump's tweets, The Associated Press reported.

A previous ban on transgender service members openly serving in the military was lifted Oct. 1, 2016, by then-Defense Secretary Ash Carter, who also directed the Pentagon to set rules for allowing transgender individuals to join the armed forces.

The policy change had allowed transgender servicemen and women to get medical care and allowed them to change their gender identities in their Pentagon personnel records.

Robbins, a Woods Cross electronics engineer whose family holds military service as a core value, said last year's decision to open the door to transgender individuals brought her great joy.

"That door has been closed now," said Robbins, 56, who serves on the boards of both the Utah Pride Center and the Transgender Education Association of Utah. "If I was a person transitioning now and was considering joining the military now, I'd have some very large doubts about whether to do that."

Robbins and Rice said a new ban on transgender service creates an unstable environment and paints a target on the backs of vulnerable individuals who may face threats to their personal safety and their military careers.

"They could have served many years and now could be facing discharge just for who they are," she said. "So all of this takes away from our military readiness and causes a major disruption solely off a string of tweets."

Estimates from the RAND Corp. place the number of transgender people currently serving in the military at about 15,000.

Hill Air Force Base could not provide any information about the number of transgender individuals currently serving at its facility near Ogden and instead directed The Salt Lake Tribune to a statement issued Wednesday from the Air Force, which refers all questions to the White House and says it will work with the Department of Defense to "address the new guidance provided by the commander in chief."

The Utah National Guard, however, has fewer than 20 individuals — of nearly 7,000 — who identify as transgender and are in some phase of transitioning, public affairs officer Lt. Col. Steven Fairbourn said.

That process is lengthy and requires a waiting period and successfully reaching certain benchmarks in consultation with a physician before gender markers are changed, he said.

In addition, "they need to continue to meet our standards and perform their duties," said Fairbourn, adding that baseline requirements of service are the same for all. "The key measures are your patriotism, your performance and your aptitude."

The presence of openly transgender individuals within the ranks of Utah's guard has not caused any problems, Fairbourn said.

"From a unit level, this has not been disruptive," he said. "These are people we have served shoulder to shoulder with."

A Pentagon spokesman, Navy Capt. Jeff Davis, declined to answer questions from the AP about what Trump's tweets mean for the current policy, including whether transgender people already serving in the military will be kicked out.

"Call the White House," he told the AP.

Utah Sen. Orrin Hatch, one of Trump's frequent defenders, broke with the commander in chief over the issue Wednesday.

"I don't think we should be discriminating against anyone," Hatch, a Utah Republican, said in a statement on Twitter. "Transgender people are people, and deserve the best we can do for them."

Hatch added that he wanted more information and "clarity" from military leaders about Trump's decision.

Army veteran and University of Utah gender studies professor Matt Basso said no research exists that indicates that the presence of transgender servicemen or -women has a negative effect on the military.

"All there is is social mores," said Basso, who served in the military for four years.

Past generations similarly fought to keep women, minorities, gays and lesbians out of the armed services, he added, for reasons largely based on myths about the consequences of side-by-side service.

But the transgender issue is hard to pin down, he said, because people of both genders are already serving and some trans individuals are seeking to transition from one gender to another.

"Anyone in the military knows someone that they thought wasn't a good soldier," he noted. "But it's got nothing to do with that person's gender."

Trump's Wednesday decree is especially disturbing because at various points, the military has struggled to fill the ranks, said Basso, who teaches a course on gender and war.

"Here we have a group of folks who agreed to go defend the country and someone who has never served is saying, Nope, we're not going to treat them as equals," he said. "It's just galling, from this veteran's perspective, to tell them what they can't do, when we have so few that do so."

— Reporter Thomas Burr contributed to this story