The Supreme Court on Tuesday -- by a 5-4 vote -- has granted the Trump administration's request to begin enforcing a ban, with some exceptions, on transgender military service members while legal appeals continue.

The move, which is temporary, reverses a lower court order that had put the policy on hold. The court said Justices Ruth Bader Ginsburg, Stephen Breyer, Sonia Sotomayor and Elena Kagan would have denied the request to stay the lower court's order.

Separately, the court rejected the administration's request for an expedited review of the issue before lower appellate courts have weighed in.

Officials said the decision has no immediate effect because one national injunction against the ban remains in place. But if a judge lifts that injunction, as expected, the Pentagon could soon decide to begin implementing the partial ban on transgender troops as the appeals process in the lower courts continues.

"The Department is pleased with the orders issued by the Supreme Court today," Department of Defense spokesperson Lt. Col. Carla Gleason said in a statement. "We will continue to work with the Department of Justice regarding next steps in the pending lawsuits. As always, we treat all transgender persons with respect and dignity. DoD's proposed policy is NOT a ban on service by transgender persons. It is critical that DoD be permitted to implement personnel policies that it determines are necessary to ensure the most lethal and combat effective fighting force in the world. DoD's proposed policy is based on professional military judgment and will ensure that the U.S. Armed Forces remain the most lethal and combat effective fighting force in the world."

Advocates estimate more than 15,000 transgender Americans are currently serving in the U.S. military and that more than 134,000 are veterans. But a memo from then-Defense Secretary James Mattis' last February memo cited 8,980 service members who identify as transgender, "and yet there are currently only 937 active duty Service members who have been diagnosed with gender dysphoria since June 30, 2016."

In 2017, President Donald Trump tweeted that he would no longer “accept or allow” transgender individuals to serve in the military, prompting the Pentagon to scramble to revise its policy and triggering legal challenges from critics who called the move discriminatory and unconstitutional. The ban so far has never taken effect.

In a March memorandum, Trump concurred with the policy recommendations of then-Defense Secretary James Mattis that transgender individuals "with a history or diagnosis of gender dysphoria" are unable to serve except under limited circumstances. That policy was constrained by existing court orders that blocked earlier attempts to ban transgender troops.

“For more than 30 months, transgender troops have been serving our country openly with valor and distinction, but now the rug has been ripped out from under them, once again," said Lambda Legal Counsel Peter Renn. "We will redouble our efforts to send this discriminatory ban to the trash heap of history where it belongs.”

The Justice Department vowed to keep defending the Trump policy in the courts.

“We are pleased the Supreme Court granted stays in these cases, clearing the way for the policy to go into effect while litigation continues. The Department of Defense has the authority to create and implement personnel policies it has determined are necessary to best defend our nation," DOJ spokesperson Kerri Kupec said in a statement.

"Due to lower courts issuing nationwide injunctions, our military had been forced to maintain a prior policy that poses a risk to military effectiveness and lethality for over a year. We will continue to defend in the courts the authority and ability of the Pentagon to ensure the safety and security of the American people,” the DOJ statement continued.

ABC News' Jack Date contributed to this story.