WASHINGTON (Reuters) - The White House is expected to tell the Pentagon in coming days how to implement a ban on transgender people in the military, according to a memo that says the defense secretary may decide whether to remove service members based on their ability to deploy, a U.S. official said on Wednesday.

FILE PHOTO: U.S. President Donald Trump delivers remarks to U.S. military personnel at Naval Air Station Sigonella following the G7 Summit, in Sigonella, Sicily, Italy, May 27, 2017. REUTERS/Darrin Zammit Lupi/File Photo

The two-and-a-half-page White House document gives Defense Secretary Jim Mattis six months to fully implement the ban, according to a story first reported by The Wall Street Journal and confirmed by the official.

It also directs the Defense Department to deny admittance to transgender individuals and to stop spending on medical treatment regimens for those currently serving, the Journal reported, citing U.S. officials.

Mattis is expected to consider “deployability” - meaning the ability to serve in a war zone, participate in exercises or live for months on a ship - as the main legal reason to decide whether to separate service members from the military, the Journal reported.

President Donald Trump said on Twitter on July 26 that the U.S. government “will not accept or allow transgender individuals to serve in any capacity” in the military, a reversal of Pentagon policy.

The surprise announcement, citing healthcare costs and unit disruption, appealed to some in Trump’s conservative political base but created uncertainty for thousands of transgender service members, many of whom came out after the Pentagon said in 2016 it would allow transgender people to serve openly.

Five transgender members of the U.S. military including Iraq and Afghanistan war veterans sued Trump earlier this month, saying that the ban was made without consulting senior military commanders. It named as defendants Trump, Mattis and other military leaders including Joseph Dunford, chairman of the Joint Chiefs of Staff.

Dunford said in a memo a day after Trump’s tweets that there would be no change in policy until Mattis received an official order from the president.

Stephen Peters at the Human Rights Campaign, an advocacy group for LGBTQ rights, responded in a tweet: “This proves @realdonaldtrump knows nothing about what it means to be #transgender or to serve in the military. Trans service members already do deploy, proving repeatedly what matters is their ability to accomplish the mission, not gender identity.”

The Obama administration, which ended the transgender ban in 2016, allowed currently serving transgender personnel to immediately begin serving openly but set July 1, 2017, as the start of new enlistments by openly transgender people.