US President Donald Trump has said he wants to ban transgender people from the US military, an action appealing to some in his conservative political base but sowing confusion about the fate of thousands of transgender service members.
Mr Trump's announcement, in a series of Twitter posts, drew swift condemnation from rights groups and some lawmakers in both parties as "raw prejudice" with purely political motives. But it was praised by conservative activists and some Republicans.
The Republican president's tweets offered no details on how the ban - reversing Democratic former President Barack Obama's policy - would be implemented.
"After consultation with my Generals and military experts, please be advised that the United States Government will not accept or allow transgender individuals to serve in any capacity in the US Military," Mr Trump wrote, , without naming any of the generals or experts.
"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," added Mr Trump, who as a presidential candidate last year vowed to fight for lesbians, gays, bisexuals and transgender people.
The Pentagon referred questions about Trump's decision to the White House.
The announcement at least temporarily changed the subject in Washington with his administration mired in investigations into his presidential campaign's contacts with Russia and struggling to win approval of any major legislation.
Wednesday was not the first time Mr Trump has targeted transgender people since he took office in January. The Republican president in February rescinded protections for transgender students put in place by Mr Obama that had let them use bathrooms corresponding with their gender identity.
The Senate's most prominent veteran, Armed Forces Committee chairman John McCain, called Mr Trump's announcement "unclear" and inappropriate given an ongoing Pentagon study on the issue.
"I do not believe that any new policy decision is appropriate until that study is complete and thoroughly reviewed by the Secretary of Defense, our military leadership, and the Congress," said McCain, a Navy pilot and prisoner of war during the Vietnam War.
Tony Perkins, president of the Family Research Council advocacy group, was among those praising the announcement. "Our troops shouldn't be forced to endure hours of transgender 'sensitivity' classes and politically correct distractions," he said.
Mr Trump's action halted years of efforts to eliminate barriers to military service based on sexual orientation or gender identity. The Pentagon last year announced it was ending its ban on transgender people serving openly, with officials calling the prohibition outdated.
The Defense Department had been expected to start allowing transgender people to begin enlisting this year. But Defense Secretary Jim Mattis on June 30 approved a six-month delay in allowing transgender recruits to join the military.
American Civil Liberties Union attorney Joshua Block called Trump's action outrageous and desperate, saying the President rejected the "basic humanity" of transgender service members.
"There are no cost or military readiness drawbacks associated with allowing trans people to fight for their country," Mr Block said. "The President is trying to score cheap political points on the backs of military personnel who have put their lives on the line for their country."
Obama's Defense Secretary, Ash Carter, last year cited a study by the RAND Corporation think tank saying there were about 2,500 transgender active-duty service members and 1,500 reserve transgender service members.
The top Democrat in the House of Representatives, Nancy Pelosi, noted that a study commissioned by the Pentagon found that the cost of providing medically necessary transition-related care involving transgender service members would amount to one-100th of 1 percent of the military's healthcare budget. The study put the cost at $2.4 million to $8.4 million a year of the more than $50 billion the Defense Department spends on healthcare.
"Once again, President Trump has shown his conduct is driven not by honour, decency, or national security, but by raw prejudice," Mr Pelosi said.
Chelsea Manning, the transgender Army soldier who served seven years in prison for leaking classified data, said on Mr Twitter that Trump's action "sounds like cowardice."
But Vicky Hartzler, a conservative Republican congresswoman, praised Trump for changing Obama's "costly and damaging policy."
The US military's ban on gays serving openly in the armed forces ended under Mr Obama in 2011 after Congress passed legislation in 2010 reversing a law dubbed "don't ask, don't tell" that had forced the ouster of thousands of service members and others to hide their sexual orientation.
The US military at times has been in the vanguard of social progress in the United States. Mr Trump's action came on the 69th anniversary of a milestone for the US military, when Democratic President Harry Truman racially integrated the armed forces years before the civil rights battles of the 1950s and 1960s.
The Pentagon under Mr Obama also opened all combat roles in the military to women.
A transgender woman who transitioned after serving as a man in the Army in the 1980s said she feared the Pentagon would go on a "witch hunt" to root out transgender people.
"It's Neanderthal thinking to say trans people can't serve in the military," said Tanya Walker, now a transgender advocate in New York. "They've been serving in the military and wars since the beginning of time."