US President Donald Trump sparked controversy with his ban on transgender military ban. Photo/AP
It appeared to be a sudden snap decision made with little or no consultation.
But US President Donald Trump's controversial ban on transgender people serving in the military "in any capacity," didn't come out of nowhere.
In fact, a congressional fight over gender reassignment surgery which threatened funding for his controversial wall with Mexico, is at least partly to blame.
According to Politico, Trump was close to securing a spending bill which included funding his border wall when an internal fight with Republicans over healthcare costs for transgender troops threatened to overturn it.
Some Republicans feared they might not have had enough votes to pass the legislation because defence hawks wanted a ban on Pentagon-funded sex reassignment surgery.
Several House conservatives threatened to obstruct the legislation unless the ban came into place.
Republican leaders approached Trump with their concerns, and fearing his funding for the wall, a major campaign promise, would not be passed, the President announced the sweeping change on Twitter.
After consultation with my Generals and military experts, please be advised that the United States Government will not accept or allow......
According to numerous sources cited by Politico, the President's decision was "in part, a last-ditch attempt to save a House proposal full of his campaign promises that was on the verge of defeat."
Trump claimed the ban's purpose was to make the military run better.
However a Trump administration official told Axios's Jonathan Swan the President's reasoning was political.
Trump wrote that he had consulted with "my generals and military experts," but he did not mention Defense Secretary Jim Mattis, the Associated Press reported.
The retired Marine general told the military service chiefs just last month to spend another six months weighing the costs and benefits of allowing transgender individuals to enlist.
At the time, Mr Mattis said this "does not presuppose the outcome of the review."
The 45th President made the announcement without giving prior notice to the Pentagon, with defence officials largely unaware of the extent of the ban.
White House spokeswoman Sarah Huckabee Sanders said the President was concerned about the policy.
"This is a very expensive and disruptive policy and, based on consultation that he's had with his national security team, he came to the conclusion that is erodes military readiness and unit cohesion and made the decision based on that," she said.
The decision affects around 7000 service members on active duty and 4000 reserves.
There are 15,000 patriotic transgender Americans in the US military fighting for all of us. What happened to your promise to fight for them? https://t.co/WzjypVC8Sr
However Trump's move sparked a furious response from both sides of politics.
His action is "harmful, misguided and weakens, not strengthens our military," Democratic Senator Kirsten Gillibrand of New York said while John McCain, the Arizona Republican and Vietnam War hero, said Trump was simply wrong.
Transgender woman Caitlyn Jenner also blasted the ban.
And the most senior trans person to serve in the Australian military transgender woman Cate McGregor said she wasn't surprised by the President's move.
Amnesty International said Trump's decision violated the human rights of all transgender Americans and accused the President of making the decision based on prejudice.
Tarah Demant, Amnesty International USA's director of Gender, Sexuality, and Identity program said: "It lays bare the president's prejudice and underlines the fact that creating policy based on bigotry is becoming a dangerous and cruel pattern for President Trump.
"The administration continues to target minority communities without pause and without facts. From stripping protections from transgender students to today's announcement, the Trump administration has made clear it has an agenda of discrimination."
'Not going anywhere'
While news of Trump's ban sets in, active members of the transgender community insist they are staying put.
Transgender airman Sgt Logan Ireland told the Air Force Times he isn't going anywhere.
"I would like to see them try to kick me out of my military," he said.
"You are not going to deny me my right to serve my country when I am fully qualified and able and willing to give my life."
Others who spoke to the Airfoce Times also insisted they are staying in uniform.
A Priceonomics analysis said a 2014 UCLA report found there around 15,500 transgender men and women serving in the military, with an addition 134,300 veterans.
With a population of 700,000 "this suggests that over 1-in-5 (or 21.4 per cent) of all openly transgender Americans are in the military or have served at one point."
True cost
While defence hawks and Republicans cite cost concerns of treating transgender personal, the Washington Post highlighted how the military spends much more on Viagra.
Citing a Rand study which estimated treatment of transgender service members would cost the military between $2.4 million and $8.4 million annually, the Pos t found the US military spends far more on other issues.
In comparison, the total military spending on erectile dysfunction medicines amounts to $84 million annually, it said citing a an analysis by the Military Times.