More than 50 House Democrats sent a letter on Friday to Defense Secretary James Mattis and Chairman of the Joint Chiefs of Staff Gen. Joseph Dunford urging the military not to comply with President Donald Trump's proposed ban on transgender people in the armed forces.

"As members of Congress with an abiding interest in our nation's military and its policies towards the LGBTQ community, we write to not only express our strong opposition to President Trump's recent tweets seeking to ban transgender individuals from the military, but to remind you not to comply with any unconstitutional directive which may ultimately be issued," the letter reads.

The letter was responding to a Trump tweet that transgender individuals will not be allowed to serve in "any capacity in the U.S. military."

"We commend the professionalism displayed by the military's leadership in their initial response to President Trump's ill-conceived pronouncement. But as you are no doubt aware, federal court decisions have recognized that under our constitution transgender people are protected against discrimination on the basis of sex – like everyone else – as well as on the basis of their transgender status," the letter reads.

Transgender service members "are defending the United States around the world as we speak, and they have long done so with distinction" and "to push out those who have devoted their lives to this country would be ugly and discriminatory in the extreme," the letter continues.

"The proposed ban categorically excludes an entire group of people from military service on the basis of a characteristic that has no relevance to their capacity to serve," it reads.

The letter was led by House Armed Services Committee ranking member Adam Smith (D., Wash.) and House Judiciary Committee ranking member John Conyers, Jr. (D., Mich.).

The letter describes such a ban on transgender service members as unconstitutional three times, including an instance calling the ban "unconstitutional on its face."

Former President Barack Obama lifted the ban on transgender military service in 2015.