(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.

Read More