WASHINGTON — President Donald Trump’s administration on Thursday asked the Supreme Court to allow enforcement of a ban on transgender people in the military, while legal challenges proceed.

Without an order from the nation’s highest court, the ban could not take effect for many months, Solicitor General D. John Sauer wrote, “a period far too long for the military to be forced to maintain a policy that it has determined, in its professional judgment, to be contrary to military readiness and the nation’s interests.”

The high court filing follows a brief order from a federal appeals court that kept in place a court order blocking the policy.

At the least, Sauer wrote, the court should allow the ban to take effect except for the seven service members and one aspiring member of the military who sued.

The court gave lawyers for the service members challenging the ban a week to respond.

Just after beginning his second term in January, Trump moved aggressively to roll back the rights of transgender people.

Among the Republican president’s actions was an executive order that claims the sexual identity of transgender service members “conflicts with a soldier’s commitment to an honorable, truthful, and disciplined lifestyle, even in one’s personal life” and is harmful to military readiness.

In response, Defense Secretary Pete Hegseth issued a policy that presumptively disqualifies transgender people from military service.

But in March, U.S. District Court Judge Benjamin Settle in Tacoma, Washington, ruled for several long-serving transgender military members who say the ban is insulting and discriminatory and that their firing would cause lasting damage to their careers and reputations.

The Trump administration offered no explanation as to why transgender troops, who have served openly over the past four years with no evidence of problems, should suddenly be banned, Settle wrote.

In 2016, during President Barack Obama’s term, a Defense Department policy permitted transgender people to serve openly in the military. Trump, in his first term, issued a directive to ban transgender service members, with an exception for some of those who had already started transitioning under more lenient rules that were in effect during Obama’s administration.

The Supreme Court allowed that ban to take effect. President Joe Biden scrapped it after he took office.