President Donald Trump said Wednesday that he is barring transgender people from serving “in any capacity” in the United States military, reversing a ruling last year under President Barack Obama that allowed them to serve openly. But hundreds if not thousands of transgender people are already in the armed forces, according to a recent study.

Former Defense Secretary Ashton Carter lifted the ban on transgender people serving openly in 2016, and commissioned a report by the RAND Corporation that studied the consequences of the ruling. There is no official or exact figure for how many transgender people serve. But the 2016 RAND study estimated that between 1,320 and 6,630 transgender service members are in the active duty military, while between 830 and 4,160 members are in reserves duty. RAND based its study on data from previous research, and estimated midrange figures of 2,450 transgender people in active duty and 1,510 in reserves. There are about 1.2 million active duty military servicemembers overall.

It’s unclear what will happen to transgender people already serving. A Department of Defense representative declined to comment. The White House did not immediately respond to a request for comment.

Trump also cited “tremendous medical costs” for transgender people as a burden the U.S. military cannot handle. But The RAND study said that of the thousands of transgender service members, only between 29-129 serving in active duty would seek out medical treatment for gender transitions.

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Mahita Gajanan at mahita.gajanan@time.com.