President Donald Trump on Friday signed a memo directing the Pentagon to bar transgender people from entering the U.S. military.

The memo comes nearly a month after Trump said in a series of tweets 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.

In his memo, Trump claims that the Obama administration “failed to identity a sufficient basis” to end the military ban – which was rolled back in June, 2016 – and orders the Pentagon to reinstate the policy.

“I am directing the Secretary of Defense, and the Secretary of Homeland Security with respect to the U.S. Coast Guard, to return to the longstanding policy and practice on military service by transgender individuals that was in place prior to June 2016 until such time as a sufficient basis exists upon which to conclude that terminating that policy and practice would not have the negative effects discussed above,” Trump wrote.

Those concerns, according to Trump, include a negative impact on military effectiveness and lethality and unit cohesion.

“Further study is needed to ensure that continued implementation of last year's policy change would not have those negative effects,” Trump said.

The guidance extends indefinitely the current military policy banning transgender recruits, which earlier this summer Defense Secretary James Mattis extended until 2018.

Trump is also ordering the military to no longer pay for transition-related health care for transgender troops.

With respect to active-duty transgender troops, Trump is leaving that decision to military leaders.

“As part of the implementation plan, the Secretary of Defense, in consultation with the Secretary of Homeland Security, shall determine how to address transgender individuals currently serving in the United States military,” Trump wrote.