WASHINGTON — A federal judge on Tuesday questioned President Donald Trump’s motives for issuing an executive order that calls for banning transgender troops from serving in the U.S. military, describing a portion of the directive as “frankly ridiculous.”

U.S. District Judge Ana Reyes indicated that she won’t rule before early March on whether to temporarily block the Trump administration from enforcing the order, which plaintiffs’ attorneys have said illegally discriminates against transgender troops.

But her questions and remarks during Tuesday’s hearing suggest that she is deeply skeptical of the administration’s reasoning for ordering a policy change. Reyes also lauded the service of several active-duty troops who sued to block the order.

“If you were in a foxhole, would you care about these individuals’ gender identity?” the judge asked a government attorney, who answered that it “would not be a primary concern of mine.”

Trump’s Jan. 27 order 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. It requires Defense Secretary Pete Hegseth to issue a revised policy.

Six transgender people who are active-duty service members and two others seeking to join the military sued to block the Trump administration from enforcing the order.

In a court filing, plaintiffs’ lawyers argued that Trump’s order openly expresses “hostility” and constitutionally impermissible “animus” toward transgender people.

Reyes said the order’s language smears thousands of transgender troops as dishonest, dishonorable and undisciplined.

She asked Justice Department attorney Jason Lynch: “How is that anything other than showing animus?”

“I don’t have an answer for you,” Lynch responded.

“No, you have an answer. You just don’t want to give it,” the judge shot back.

Trump’s order also says that “use of pronouns that inaccurately reflect an individual’s sex” is inconsistent with a government policy to “establish high standards for troop readiness, lethality, cohesion, honesty, humility, uniformity, and integrity.”

Reyes said it is “frankly ridiculous” to suggest that pronoun usage could impact the military readiness of the U.S. armed forces.

Reyes peppered Lynch for several hours with questions about the executive order. They disagreed on whether the language of the executive order explicitly bans transgender people from serving in the military.

Reyes is expected to hear more arguments today and again on March 3.