WASHINGTON (AP) — The Pentagon is allowing transgender people to enlist in the military beginning Jan. 1, despite President Donald Trump’s opposition.

The new policy reflects growing legal pressure on the issue, and the difficult hurdles the federal government would have to cross to enforce Trump’s demand to ban transgender individuals from the military. Two federal courts already have ruled against the ban. Potential transgender recruits will have to overcome a lengthy and strict set of physical, medical and mental conditions that make it possible, though difficult, for them to join the armed services.

Maj. David Eastburn, a Pentagon spokesman, says the enlistment of transgender recruits will start Jan. 1 and go on amid the legal battles. The Defense Department also is studying the issue.

Eastburn told The Associated Press on Monday that the new guidelines mean the Pentagon can disqualify potential recruits with gender dysphoria, a history of medical treatments associated with gender transition and those who underwent reconstruction. But such recruits are allowed in if a medical provider certifies they’ve been clinically stable in the preferred sex for 18 months and are free of significant distress or impairment in social, occupational or other important areas.

Transgender individuals receiving hormone therapy also must be stable on their medication for 18 months.

The requirements make it challenging for a transgender recruit to pass. But they mirror concerns President Barack Obama‘s administration laid out when the Pentagon initially lifted its ban on transgender service last year.

The Pentagon has similar restrictions for recruits with a variety of medical or mental conditions, such as bipolar disorder.

“Due to the complexity of this new medical standard, trained medical officers will perform a medical prescreen of transgender applicants for military service who otherwise meet all applicable applicant standards,” Eastburn said.

Last year, then-Defense Secretary Ash Carter ended the ban on transgender service members, allowing them to serve openly in the military. He said that within 12 months — or by July 2017 — transgender people also would be able to enlist.

Trump, however, tweeted in July that the federal government “will not accept or allow” transgender troops to serve “in any capacity” in the military. A month later, he issued a formal order telling the Pentagon to extend the ban. He gave the department six months to determine what to do about those currently serving.

Trump’s decision was quickly challenged in court, and two U.S. district court judges have already ruled against the ban. Part of one ruling required the government to allow transgender individuals to enlist beginning Jan. 1.

The government had asked that the Jan. 1 requirement be put on hold while the appeal proceeds. The Pentagon move Monday signals the growing sense within the government that authorities are likely to lose the legal fight.

“The controversy will not be about whether you allow transgender enlistees, it’s going to be on what terms,” said Brad Carson, who was deeply involved in the last administration’s decisions. “That’s really where the controversy will lie.”

Carson worried, however, that the Defense Department could opt to comply with a deadline on allowing transgender recruits, but “under such onerous terms that practically there will be none.” Carson, who worked for Carter as the acting undersecretary of defense for personnel, said requiring 18 months of stability in the preferred sex is a reasonable time.

“It doesn’t have any basis in science,” he said, noting that experts have suggested six months is enough. “But as a compromise among competing interests and perhaps to err on the side of caution, 18 months was what people came around to. And that’s a reasonable position and defensible.”

[Image via Miami2you Shutterstock]

Have a tip we should know? [email protected]