The White House is expected to issue guidance to the Pentagon on President Donald Trump's ban on transgender military service as early as Thursday.

According to The Wall Street Journal, the guidance is being issued in a two-and-a-half page memo that directs Defense Secretary James Mattis to create a policy in six months.

In a series of tweets late last month, Trump declared that the military will no longer “accept or allow” transgender troops to serve “in any capacity.” The president said that the ban was needed to avoid “tremendous medical costs and disruption” posed by transgender people serving in the military.

He later defended his decision, saying at a press conference that he was doing the military “a great favor.”

“I have great respect for the community,” Trump told reporters. “I think I have great support, or I had great support from that community, right? Got a lot of votes. But the transgender, the military's working on it now; they're doing the work. It's been a very difficult situation, and I think I'm doing a lot of people a favor by coming out and just saying it.”

According to various sources, the White House wants to block transgender people from enlisting in the military and stop the military from paying for the transition-related medical care of active duty transgender service members. The policy would also spell out under which conditions transgender troops can be kicked out of the United States Armed Forces.

Two LGBT rights groups, the National Center for Lesbian Rights (NCLR) and GLBTQ Legal Advocates and Defenders (GLAD), have already filed a federal lawsuit challenging the ban. Two additional groups, OutServe-SLDN and Lambda Legal, have promised to do the same.