The Pentagon will pay for an active-duty soldier’s gender confirmation surgery, which took place Tuesday afternoon, according to a statement sent to multiple news outlets.

The surgery and its approval come months after President Donald Trump signed a memo to ban transgender recruits from serving in the military and cut future funding for gender confirmation surgeries.

The Pentagon said that the service member had the surgery in a private hospital Tuesday afternoon after it was approved by the Pentagon under a waiver that allowed the military to pay for the operation.

According to a statement sent to NBC News and BuzzFeed’s Jon Passantino, Pentagon spokeswoman Dana W. White said that the waiver for the surgery was approved because the service member had already begun a “sex-reassignment course of treatment” and the treating doctor said it was “medically necessary.”

“This afternoon, an active-duty military member received a sex-reassignment surgery,” White explained. “Military hospitals do not have the surgical expertise to perform this type of surgery, therefore it was conducted in a private hospital.”

White added: “The Supplemental Health Care Program will cover this surgery in accordance with the Department’s interim guidance on transgender Service members.”

Active-duty service members typically use the Supplemental Health Care Program to pay for treatment completed within the private sector.

Pentagon confirms an active-duty military member received sex-reassignment surgery today, and it will pay for the procedure for the first time pic.twitter.com/4WQGnPDlhd — Jon Passantino (@passantino) November 15, 2017

NBC News, which first reported on the approval of the surgery, identified the service member as an infantry solider who identifies as a woman after speaking to a source who is close to the soldier.

The transgender soldier got her Combat Infantry Badge in Afghanistan in Operation Anaconda in 2003.

After announcing his plans on Twitter, Trump signed a presidential memo in August in an attempt to ban transgender men and women from serving in the military and to stop the military’s funding of gender confirmation surgery.

Trump defended the policy change as a cost-saving measure, despite a 2016 Rand Corp. study that found that allowing transgender people to serve openly in the military would have a minimal effect on readiness and health care costs.

A federal judge temporarily blocked the White House’s transgender ban in late October, saying that the reasons Trump provided for the ban “do not appear to be supported by any facts.”