The flag of diversity flutters at the US Embassy in San Jose, Costa Rica, as a show of support for the lesbian, gay, bisexual, and transgender (LGBT) community. [Reuters]

The US Supreme Court on Tuesday let President Donald Trump enforce his policy barring certain transgender people from joining or staying in the military as the justices put on hold lower court rulings blocking the plan on constitutional grounds.

The conservative-majority granted the Trump administration’s request to lift injunctions issued by federal judges against the policy while a legal challenge continues in lower courts.

Liberal Justices Ruth Bader Ginsburg, Stephen Breyer, Elena Kagan and Sonia Sotomayor said they would have kept the injunctions in place blocking the policy. The justices refused the administration’s request for them to decide the merits of the legal fight even before a California-based federal appeals court already considering the matter is given a chance to rule.

The lawsuits challenging the policy were filed in 2017 by civil liberties and gay and transgender rights groups on behalf of current transgender military service members, including some deployed overseas with decades of experience in the armed forces, and transgender people aspiring to join the military.

Trump in 2017 announced a plan to ban transgender people from the military, moving to reverse a policy announced a year earlier under Democratic former President Barack Obama allowing them for the first time to serve openly and receive medical care to transition genders.

Trump, whose administration also has taken other steps to limit the rights of transgender Americans, cited the “tremendous medical costs and disruption” of having transgender military personnel.

Trump in March 2018 announced he would endorse a plan by then-Defense Secretary Jim Mattis that replaced the ban on all transgender people. The revised policy would ban the service of transgender people who seek or have undergone gender transition steps. It also would ban under certain circumstances transgender people who experience gender dysphoria, a condition the American Psychiatric Association defines as clinically significant distress due to “a conflict between a person’s physical or assigned gender” and the individual’s gender identity.

Federal courts blocked the administration’s policy, finding that it likely violated the U.S. Constitution’s guarantee of equal protection under the law. Various injunctions allowed transgender troops to join the armed forces as of Jan. 1, 2018.

Though another injunction issued by a judge in Maryland was not on appeal, the administration said in court papers the high court’s action would apply to that one, too.