Civil rights groups on Monday filed two lawsuits challenging US President Donald Trump's controversial ban on transgender people serving in the country's military.

Both cases said the ban violated US constitutional guarantees of equal protection and due process under the Fifth Amendment, while one said it also infringed on the free speech rights of service members.

The American Civil Liberties Union (ACLU) filed one of the lawsuits in Baltimore federal court on behalf of six transgender people serving in several branches of the army.

"Each and every claim made by President Trump to justify this ban can be easily debunked by the conclusions drawn from the Department of Defense’s own review process," Josh Block, an ACLU lawyer, said in a statement.

READ MORE: Trump says US military will 'not accept' transgender people

He added that allowing men and women who are transgender "to serve openly" and providing them with necessary healthcare "does nothing to harm military readiness or unit cohesion".

"Men and women who are transgender with the courage and capacity to serve deserve more from their commander-in-chief," the statement said.

Among the plaintiffs is Petty Officer First Class Brock Stone, who served in the US Navy for nine years.

Stone and his fellow officers said that, with his order, Trump "cast aside the rigorous, evidence-based policy" of the defence department, and "replaced it with discredited myths and stereotypes, uninformed speculation, and animus against people who are transgender".

'Disrespectful and dishonourable'

The second lawsuit was filed in the city of Seattle by Lambda Legal, a group of lawyers fighting for gay rights, and OutServe-SLDN, another group advocating for equality in the military.

The case, filed on behalf of an army staff sergeant, two transgender people who wish to join the military and various other groups, states that Trump's ban "not only wrongfully prevents patriotic, talented Americans from serving, it also compromises the safety and security" of the country.

In a statement, Staff Sergeant Catherine Schmid, one of the plaintiffs, said, the ban is "disrespectful and dishonourable".

"I love serving my country, which I've been doing for more than 12 years. Since the ban on open service by transgender men and women was lifted, I've been able to live and serve as my authentic self, which has allowed me to form stronger bonds with my fellow service members."

'Politically-motivated discrimination'

Trump announced the ban in a series of Twitter posts on July 26, reversing a policy of his predecessor, Barack Obama.

It halted years of efforts to eliminate barriers to military service based on sexual orientation or gender identity, including an "Open Service Directive" designed to let transgender people serve without fear of discharge.

The ban was widely seen as an appeal by Trump, a Republican, to his conservative political base.

RT to show support for Staff Sergeant Cathrine Schmid! She is honored to serve her country, and she deserves to continue! #NoTransBan #LGBTQ pic.twitter.com/FAuzbyAttp — Lambda Legal (@LambdaLegal) August 28, 2017

Civil rights groups and some politicians from both the Democratic and Republican parties accused Trump of politically-motivated discrimination.

Roughly 2,500 active duty personnel are transgender, according to a RAND Corporation study cited last year by Ash Carter, a former defence secretary.

In a statement on Monday, the White House said: "We do not comment on active or pending litigation."