President Donald Trump has taken official action on his tweets from July, signing a directive on Friday that will bar the Pentagon from allowing transgender individuals from openly serving in the military.

The move reverses an Obama-era plan that would have allowed transgender individuals to serve in the armed forces. Per the new directive, the Department of Defense will have six months to develop a plan on how to implement the ban, reports CNN.

“In my judgment, the previous Administration failed to identify a sufficient basis to conclude that terminating the Departments’ longstanding policy and practice would not hinder military effectiveness and lethality, disrupt unit cohesion, or tax military resources, and there remain meaningful concerns that further study is needed to ensure that continued implementation of last year’s policy change would not have those negative effects,” Trump said in the presidential memorandum.

Also included in the directive: a ban on the Department of Defense using its funds on gender-reassignment surgeries for transgender individuals currently in the military, except in situations where the medical regimen is already taking place.

The official memo comes a month after Trump declared the ban via Twitter, blaming “tremendous medical costs and disruption that transgender in the military would entail.” LGBT groups quickly spoke out against Trump’s tweets, and detractors pointed to the fact that said costs are small compared to other factors in the military’s budget.

The Pentagon ended its previous transgender ban in June 2016. Then-Defense Secretary Ash Carter gave the Pentagon a year to study how to allow transgender individuals to join the military.