Transgender military members are suing Donald Trump for his recent 'ban'.

Five transgender members of the US military including Iraq and Afghanistan war veterans have sued President Donald Trump, challenging his ban on transgender people serving in the armed forces.

Trump said on Twitter on July 26 that the US government “will not accept or allow transgender individuals to serve in any capacity” in the military, a reversal of Pentagon policy that the lawsuit said was made without consulting senior military commanders.

The surprise announcement, citing healthcare costs and unit disruption, appealed to some in Trump’s conservative political base but created uncertainty for thousands of transgender service members, many of whom came out after the Pentagon said in 2016 it would allow transgender people to serve openly.

Trump’s tweets appeared to dismiss findings from a RAND Corporation study commissioned by the Pentagon that found allowing transgender people to serve would “cost little and have no significant impact on unit readiness.”

The White House said it does not respond to pending litigation.

The service members suing the president are three US Army soldiers, one US Air Force airman and one member of the US Coast Guard who are active duty.

The defendants are listed as Trump, Defense Secretary James Mattis and other military leaders including Joseph Dunford, the chairman of the Joint Chiefs of Staff. Dunford said in a memo a day after Trump’s tweets that there would be no change in policy until Mattis received an official order from the president.

LISTEN: Cate McGregor on Trump’s Transgender Ban. Post continues below.

That order has yet to be issued.

“In the meantime, we will continue to treat all of our personnel with respect,” Dunford said.

Lawyer Levi said the plaintiffs, some of whom are near retirement, need not wait for an official policy because the tweets alone created uncertainty about their futures.