The White House is ordering the Pentagon to come up with a plan to implement the ban on transgender people serving in the military, according to a memo providing the guidance obtained by The Wall Street Journal.

The guidance will allow Mattis to make "deployability" the primary legal consideration in determining whether a current service member will be allowed to stay in the military, including the member's ability to serve in a war zone, participate in exercises or live for months on a ship, officials told the Journal.

It will also direct the military to refuse to admit transgender people in the future and will cut off funding for medical treatment related to current members' transitions.

"The United States government will not accept or allow transgender individuals to serve in any capacity in the U.S. military," Trump wrote. "Our military must be focused on decisive and overwhelming victory and cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail."

Trump's unexpected announcement created a sense of whiplash for the military and the LGBT community, coming just over a year after President Barack Obama's Defense Secretary Ash Carter had lifted the ban allowing current transgender members to serve openly and ordered a years-long study on how to enlist new transgender people into military service in June 2016.

The White House initially gave few details on how Trump's order was to be implemented – the announcement was said to have caught the Pentagon by surprise – leaving confusion about whether those who had come out in the past year would see their careers suddenly ended as a result.

The day after Trump's tweets, Marine Gen. Joseph Dunford, chairman of the Joint Chiefs of Staff, said the military would not change its policy until the White House sent over formal guidance on how to proceed.

Separating active duty members on the basis of their gender identification could pose a serious legal obstacle, and advocates have moved to issue legal challenges to the new White House policy before it is put into place. They argue that a ban on military service based on gender identification could be a violation of the Constitution's guarantee of equal protection under the law.

Advocacy groups estimate some 7,000 active duty military service members are transgender, with between 1,320 and 6,600 serving openly, according to a Rand Corp. study commissioned by the Pentagon last year.