WASHINGTON (AP) — The Pentagon on Wednesday will sweep away Trump-era policies that largely banned transgender people from serving in the military, issuing new rules that offer them wider access to medical care and assistance with gender transition, defense officials told The Associated Press.

The new department regulations allow transgender people who meet military standards to enlist and serve openly in their self-identified gender, and they will be able to get medically necessary transition-related care authorized by law, said the officials, who spoke on condition of anonymity to discuss internal decisions not yet made public.

The changes come after a two-month Pentagon review aimed at developing guidelines for the new policy, which was announced by President Joe Biden just days after he took office in January.

Biden’s executive order overturned the Trump policy and immediately prohibited any service member from being forced out of the military on the basis of gender identity. Defense Secretary Lloyd Austin then gave the Pentagon two months to finalize the more detailed regulations that the military services will follow.

The new rules also prohibit discrimination based on gender identity. Their expected release Wednesday coincides with International Transgender Day of Visibility.

Austin has also called for a reexamination of the records of service members who were discharged or denied reenlistment because of gender identity issues under the previous policy. Results of that review have not been released.

Until a few years ago, service members could be discharged from the military for being transgender, but that changed during the Obama administration. In 2016, the Pentagon announced that transgender people already serving in the military would be allowed to serve openly, and that by July 2017, they would be allowed to enlist.

After Donald Trump took office, however, his administration delayed the enlistment date and called for additional study. A few weeks later, Trump caught military leaders by surprise, tweeting that the government wouldn’t accept or allow transgender people to serve “in any capacity” in the military.

After a lengthy and complicated legal battle and additional reviews, the Defense Department in April 2019 approved a policy that fell short of an all-out ban but barred transgender troops and recruits from transitioning to another sex and required most individuals to serve in what the administration called their “birth gender.”

Under that policy, currently serving transgender troops and anyone who had signed an enlistment contract before the effective date could continue with plans for hormone treatments and gender transition if they had been diagnosed with gender dysphoria.

But after that date, no one with gender dysphoria who was taking hormones or had transitioned to another gender was allowed to enlist. Troops that were already serving and were diagnosed with gender dysphoria were required to serve in the gender assigned at birth and were barred from taking hormones or getting transition surgery.

The new policies being released Wednesday are similar to those developed in 2016.

As of 2019, an estimated 14,700 troops on active duty and in the reserves identify as transgender, but not all seek treatment. There are more than 1.3 million active-duty troops and close to 800,000 in the National Guard and Reserves.

Since July 2016, more than 1,500 service members were diagnosed with gender dysphoria; as of Feb. 1, 2019, there were 1,071 currently serving. According to the Pentagon, the department spent about $8 million on transgender care from 2016 to 2019. The military’s annual health care budget tops $50 billion.

All four service chiefs told Congress in 2018 that they had seen no discipline, morale or unit readiness problems with transgender troops serving openly in the military. But they also acknowledged that some commanders were spending a lot of time with transgender people who were working through medical requirements and other transition issues.