The Pentagon will pay for a transgender soldier's gender reassignment surgery for the first time.

"This afternoon, an active-duty military member received a sex-reassignment surgery,” the Pentagon said in a statement, adding that the surgery was performed in a private hospital because military hospitals do not have the “surgical expertise” needed to perform the operation.

The director of the Defence Intelligence Agency approved a waiver for the surgery because the service member had already begun treatment, and the treating doctor deemed the surgery medically necessary, the Defence Department said.

Funding for service members’ gender reassignment surgeries has become a hot-button issue in American politics, with some arguing that the cost would be a burden on the military.

President Donald Trump used this line of reasoning when he announced a ban on transgender troops in July. According to Politico, Mr Trump issued the directive shortly after members of the House informed him that the debate over gender reassignment costs was holding up a defence spending bill.

Thousands march against Donald Trump in LGBT rights parade Show all 8 1 /8 Thousands march against Donald Trump in LGBT rights parade Thousands march against Donald Trump in LGBT rights parade A marcher hold a sign that reads "Love is Love is Love" on the National Mall with the Washington Monument in the background during the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade Marchers unfurl a huge rainbow flag as they prepare to march in the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade Marchers gather to hear speakers at the end of the Los Angeles LGBTQ #ResistMarch AP Thousands march against Donald Trump in LGBT rights parade Gil Mendez, of San Francisco, holds a sign to honor the victims of the shooting at the Pulse Nightclub in Orlando as he marches during the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade An demonstrator looks on as LGBT members and their supporters take part of the Equality March for Unity AFP/Getty Images Thousands march against Donald Trump in LGBT rights parade A marcher listens to speakers at the end of the Los Angeles LGBTQ #ResistMarch AP Thousands march against Donald Trump in LGBT rights parade LGBT members and their supporters take part of the Equality March for Unity AFP/Getty Images Thousands march against Donald Trump in LGBT rights parade A marcher mugs for the camera during the Los Angeles LGBTQ #ResistMarch AP

“Our military must be focused on decisive and overwhelming victory and cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail,” the President tweeted at the time.

A 2016 study commissioned by the military found that allowing transgender troops to serve would “have minimal impact on readiness and health care costs” for the Defence Department. Health care costs would increase by an estimated $2.4m – a 0.04 to 0.13 per cent increase in spending.

Mr Trump issued a formal memo in August, officially banning all new transgender recruits and giving Defence Secretary James Mattis the power to decide what would happen to active transgender service members. It also ordered the Pentagon to stop paying for all transgender-related medical expenses, “except to the extent necessary to protect the health of an individual who has already begun a course of treatment to reassign his or her sex.”

Transgender troop at VMAs: 'It's a great opportunity to build awareness'

A federal judge temporarily blocked Mr Trump's policy in October, ruling it “suspect,” and likely unconstitutional.

“There is absolutely no support for the claim that the ongoing service of transgender people would have any negative effective on the military at all,” wrote Judge Colleen Kollar-Kotelly of the Federal District Court for the District of Columbia.

“In fact," she added, "there is considerable evidence that it is the discharge and banning of such individuals that would have such effects.”