Defense Secretary Jim Mattis late Tuesday announced that transgender troops will be allowed to continue serving in the military pending the results of a study by experts.

The announcement follows an order from President Trump — first announced in a tweet — declaring that transgender service members can no longer serve in the military, effectively reversing an Obama administration policy. The order also affects the Department of Homeland Security, which houses the Coast Guard.

“Once the panel reports its recommendations and following my consultation with the secretary of Homeland Security, I will provide my advice to the president concerning implementation of his policy direction,” Mattis said in the statement. “In the interim, current policy with respect to currently serving members will remain in place.”

Mattis’ move buys time for the Pentagon to determine how and if it will allow thousands of transgender troops to continue to serve, whether they will receive medical treatment, or how they will be discharged.