Sir Michael Fallon has denounced Donald Trump’s ban on transgender people serving in the military, saying it was “only right” that the military opposed all forms of discrimination.

Asked about the ban, the defence secretary told The Telegraph: "No, we don't support that ban. I want our military to be completely open. It is right that the military should be equally open to anybody, irrespective of their race, their colour, their gender their sexuality. That is only right."

In a widely-condemned move announced on Twitter, the US President on Wednesday said transgender people would be banned from serving “in any capacity” in the military.

He said the US military needed to be “decisive and overwhelming” and "cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail".

British defence chiefs were quick to support the service of transgender people in the military.

Rear Admiral Alex Burton, Commander UK Maritime Forces, said on Twitter that the military opposed discrimination, adding: “We're a better fighting force for it".

Sir Michael, who was visiting Sydney for ministerial talks with his Australian counterpart, said he had “made it very clear” that all three of the armed services should be open to transgender people and that women should be able to serve in all branches of the military.

“It is important that they [the armed services] reflect the society that they serve,” he said. “We’re opening up all of the services to women... In time, I want to see every role in the armed services fully open [to women].”

A Ministry of Defence spokesman said this week it did not comment on "US military recruitment policy".

"We are clear that all LGBT+ members of our armed forces play a vital role in keeping our nation safe,” the spokesman said.

Sir Michael’s remarks came as it was reported that Mr Trump had made a snap decision to ban transgender people, in part to secure funding for his border wall with Mexico.

The Republicans were hoping to pass a spending bill stacked with his campaign promises, including money to build his border wall with Mexico. But an internal Republican fight over transgender troops was threatening to scupper the bill.

Some Republicans wanted a ban on Pentagon-funded sex reassignment operations, in return for passing the bill, but the Republican leadership refused.

Mr Trump, hoping to end the stand-off, then tweeted that he was banning all transgender personnel from the military – to the consternation of politicians who said that was never what they were seeking.

“This is like someone told the White House to light a candle on the table and the White House set the whole table on fire,” a senior House Republican aide told Politico.