Dozens of House Democrats on Friday warned Defense Secretary Jim Mattis that he should not comply with President Trump's ban on transgender military service because it is an "unconstitutional directive."

The group of 53 lawmakers, which included members of the Armed Services and Judiciary committees, sent Mattis and Joint Chiefs Chairman Gen. Joseph Dunford a letter saying the Supreme Court and federal courts have recognized that transgender citizens cannot be discriminated against based on sex and gender even in military affairs.

"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," according to the letter, which was signed by Armed Services ranking member Rep. Adam Smith, D-Wash., and Judiciary ranking member Rep. John Conyers, D-Mich.

The group claimed Trump's "arbitrary and capriciously issued tweets" were designed to drive a political wedge and were not based on good data or policy input.

"The president's proposal appears to be based on raw political calculation" and any ban would be "unconstitutional on its face," they wrote.

Trump issued a sudden series of tweets July 26 saying that transgender troops would no longer be allowed to serve in any capacity in the military, saying that such service is costly and disruptive.

"After consultation with my Generals and military experts, please be advised that the United States Government will not accept or allow transgender individuals to serve in any capacity in the U.S. Military," Trump wrote. "Our military must be focused on decisive and overwhelming victory and cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail."

The major policy announcement could reverse the decision last summer to allow open transgender service and caught most officials at the Pentagon and Capitol Hill off guard. Mattis had just delayed the deadline for the start of transgender recruiting until January amid lingering concerns over boot camp.

The tweets also drew sharp criticism from both sides of the political aisle and prompted Dunford to issue a note to the Pentagon that current policy would remain in place and all service members would be treated with respect and dignity until additional guidance came from the White House.