(CNN) The White House on Friday announced a policy to ban most transgender people from serving in the US military.
Following a Pentagon policy review after a tweet by President Donald Trump last year, the White House said the policy will say "transgender persons with a history or diagnosis of gender dysphoria -- individuals who the policies state may require substantial medical treatment, including medications and surgery -- are disqualified from military service except under certain limited circumstances."
White House press secretary Sarah Sanders said in a statement that Trump had rescinded his previous policy to allow this new policy to take its place.
The new policy, according to Sanders, was "developed through extensive study by senior uniformed and civilian leaders, including combat veterans," under the direction of Defense Secretary James Mattis.
According to a Pentagon memo about the policy, exceptions to the ban include people who have been "stable for 36 consecutive months in their biological sex prior to accession," servicemembers who "do not require a change of gender" and troops who started serving under the Obama administration's policy prior to the new memo.
"This new policy will enable the military to apply well-established mental and physical health standards -- including those regarding the use of medical drugs -- equally to all individuals who want to join and fight for the best military force the world has ever seen," Sanders said.
After Trump initially tweeted his announcement of a ban, transgender troops took the policy to court, which halted its implementation.
The Pentagon "will still comply with federal court rulings and continue to assess and retain transgender service members," US Army Maj. Dave Eastburn, a Pentagon spokesman, has told CNN.
In February, the Pentagon confirmed to CNN that the first transgender person had signed a contract to join the US military following a federal judge's ruling that said the military would have to accept transgender people.
LGBT advocacy groups pushed back against the new policy, calling it a discriminatory attack on those who have volunteered their lives for the country.
"The Trump-Pence administration's continued insistence on targeting our military families for discrimination is appalling, reckless, and unpatriotic," said Ashley Broadway-Mack, president of the American Military Partner Association and spouse of an active duty Army officer.
Senior staff attorney for the ACLU Joshua Block said, "What the White House has released tonight is transphobia masquerading as policy. This policy is not based on an evaluation of new evidence. It is reverse-engineered for the sole purpose of carrying out President Trump's reckless and unconstitutional ban, undermining the ability of transgender service members to serve openly and military readiness as a whole."
This story has been updated.