The Supreme Court on Tuesday allowed President Donald Trump’s ban of transgender people from military service to go into effect as the case winds its way through lower courts.

The nation’s highest court ruled 5-4 in favor of allowing the ban to take effect, with the court’s conservatives voting in favor of the ban and its liberal members voting against it. The Trump administration had urged the justices to take up cases about the plan directly, but the court declined for now.

Trump announced on Twitter in July 2017 that transgender people would be barred from serving "in any capacity" in the U.S. military, changing fresh Defense Department policy that protected transgender people and allowed them to serve openly. The Defense Department policy was announced in June 2016 by the administration of then-President Barack Obama with plans to implement it starting no later than July 2017, according to The Washington Post.

Just before the policy was set to take effect, then-Defense Secretary James Mattis announced its implementation would be delayed by six months. Trump took to Twitter one month later to announce the transgender service ban.

The policy was challenged in court by groups representing transgender individuals, leading courts across the country to issue nationwide injunctions barring the administration from implementing it. The Supreme Court on Tuesday lifted those preliminary injunctions.

The Trump administration announced in March 2018 that it would bar transgender people from serving in the military but that, after further study, transgender people who serve “in their biological sex” without seeking to undergo gender reassignment surgery would be allowed to serve. The policy also has an exception for troops who began the process of changing their genders under Obama-era rules. The military said last year that over 900 men and women have done so.

The Associated Press contributed to this report.