WASHINGTON — President Donald Trump late on Friday issued a new order banning transgender individuals from serving in the military except under “limited circumstances,” again insisting they pose a threat to military readiness.

The move was immediately blasted by rights advocates as the White House continuing a pattern of discrimination against thousands of honorably serving troops and potential recruits.

In a late Friday night announcement, the White House said retaining troops with a history or diagnosis of “gender dysphoria” — those who may require substantial medical treatment — “presents considerable risk to military effectiveness and lethality.”

The move rescinds previous orders offered on the issue in favor of new guidelines set out by Defense Secretary Jim Mattis.

Another circuit court rejects transgender ban, admonishes Trump lawyers Unless Justice Department appeals decision to Supreme Court in the next week, transgender recruits may enlist starting Jan. 1.

Earlier Friday, Maj. David Eastburn, a Pentagon spokesman, said the announcement of a new policy would have no immediate practical effect on the military because the Pentagon is obliged to continue to recruit and retain transgender people in accordance with current law.

But outside advocates said the new rules appeared to be a new attempt to boot those individuals from the ranks, under the argument that their medical diagnosis makes them unable to meet enlistment and retention standards.

White House Press Secretary Sarah Huckabee Sanders said the 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.”

× Fear of missing out? Sign up for the Early Bird Brief - a daily roundup of military and defense news stories from around the globe. Thanks for signing up. By giving us your email, you are opting in to the Early Bird Brief.

Trump surprised the Pentagon’s leadership last summer with a series of tweets declaring he would reverse a policy change by former President Barack Obama to allow transgender individuals to serve openly.

That ban has been blocked by several legal challenges, and four federal courts have ruled against the White House’s position. The Pentagon in recent months has allowed transgender troops already serving to stay in the military, and began allowing transgender individuals to enlist on Jan. 1.

People with the Human Rights Campaign hold up "equality flags" during an event organized by Rep. Joe Kennedy, D-Mass., in support of transgender members of the military, Wednesday, July 26, 2017, on Capitol Hill in Washington. (Jacquelyn Martin/AP)

In the Friday release, the White House said Mattis and Homeland Security Secretary Kirstjen Nielsen agreed with the policy update.

Rights advocates said that while the new policy won’t supersede any of the existing court challenges, it has sent a disturbing message to military families that their commander in chief doesn’t support their service and sacrifices.

“The Trump administration’s continued insistence on targeting our 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.

“They are literally wreaking havoc on the lives of our military families; families in South Korea, families in Virginia, families in North Carolina. It’s like ‘don’t ask, don’t tell’ all over again.”

David Stacy, director of government affairs at the Human Rights Campaign, criticized Trump for the timing of the new order.

“This administration chose to announce this policy late on a Friday night, under cover of darkness, because they are embarrassed by it, and they should be,” he said. “We have 15,000 or more transgender troops and their families who are going to wake up tomorrow with their lives in chaos.

“This is a threat to military security and our national defense.”

Opponents are set to argue against the military transgender policies in court again on Tuesday. Rights groups said none of the changes in the new policy would affect their legal strategy moving forward.

The Associated Press contributed to this story.