President Donald Trump signed a memorandum on Friday that bans some transgender individuals from serving in the U.S. military, but gives the armed forces latitude in implementing policies.

The memorandum said transgender individuals with a history of gender dysphoria, defined as “those who may require substantial medical treatment, including through medical drugs or surgery,” are disqualified from military service “except under certain limited circumstances.”

It added that the secretaries of defence and homeland security “may exercise their authority to implement any appropriate policies concerning military service by transgender individuals.”

Story continues below advertisement

The White House said Defense Secretary Jim Mattis had found that individuals with a history or diagnosis of gender dysphoria presented a risk to military effectiveness.

“This new policy will enable the military to apply well-established mental and physical health standards ... equally to all individuals who want to join and fight for the best military force the world has ever seen,” it said.

Trump’s decision is less restrictive than his initial comments in a July Twitter message saying he would prohibit transgender people from military service. That blanket ban reversed former President Barack Obama’s policy.

At the time, Trump said on Twitter, the military “cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail.”

However, a number of federal judges have already issued rulings blocking Trump’s ban, saying it would probably violate the right, under the U.S. Constitution, to equal protection under the law.

On Friday, the Pentagon reaffirmed that it would continue to comply with federal law.

“(The Pentagon) will continue to assess and retain transgender service members,” Pentagon spokesman Major David Eastburn said.

Story continues below advertisement

In a February memorandum to the White House, made public on Friday, Mattis said transgender individuals with a history of gender dysphoria were disqualified from military service.

But he added that those currently serving could continue to serve if they had been diagnosed with gender dysphoria since Obama’s policy took effect.

Mattis also recommended that transgender individuals who require or have undergone gender transition be disqualified from military service.

“In my professional judgment, these policies will place the Department of Defense in the strongest position to protect the American people, to fight and win America’s wars, and to ensure the survival and success of our service members around the world,” Mattis wrote.

A court filing by the Trump administration said 8,980 service members reportedly identify as transgender, but only 937 active duty service members were diagnosed with gender dysphoria since June 30, 2016.

At least one openly transgender recruit has already signed a contract to join the U.S. military since a federal court ruled late last year that the military would have to accept transgender individuals.

Story continues below advertisement

Advocates have said they believe dozens, if not hundreds, of transgender people will seek to join those already serving.

The Human Rights Campaign, a lesbian, gay, bisexual and transgender advocacy group, condemned the Trump policy.

“There is simply no way to spin it, the Trump-Pence administration is going all in on its discriminatory, unconstitutional and despicable ban on transgender troops,” Chad Griffin, its president, said in a statement.

The Democratic National Committee also strongly criticized the move, saying it was an insult to transgender service members.