A new lawsuit filed in federal district court in the District of Columbia on behalf of five transgender servicemembers challenges President Trump’s apparent reversal of the military’s transgender service policy.

On the morning of July 26, President Trump announced a major military personnel policy change in a series of tweets:

After consultation with my Generals and military experts, please be advised that the United States Government will not accept or allow...... — Donald J. Trump (@realDonaldTrump) July 26, 2017

....Transgender individuals to serve in any capacity in the U.S. Military. Our military must be focused on decisive and overwhelming..... — Donald J. Trump (@realDonaldTrump) July 26, 2017

....victory and cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail. Thank you — Donald J. Trump (@realDonaldTrump) July 26, 2017

The complaint filed yesterday alleges that the tweets were made “without consulting the Joint Chiefs of Staff” and that the White House has turned those tweets “into official guidance, approved by the White House counsel’s office, to be communicated to the Department of Defense.” (For more on the formal mechanisms by which the President’s tweets could become official policy, see Russell Spivak’s explainer on Lawfare’s Foreign Policy feed.)

The five plaintiffs represent the Air Force, Army, Coast Guard, and National Guard, and have among them decades of service and multiple deployments to active combat. Each plaintiff relied on the government’s 2016 policy shift indicating that transgender servicemembers would be permitted to serve openly and each notified her superior of her transgender status. The suit further notes that each plaintiff has been serving openly since without incident.

The suit alleges two constitutional violations—equal protection and due process under the Fifth Amendment. The equal protection count alleges that the ban discriminates against the plaintiffs based on their sex and transgender status arbitrarily and without any rational basis. The due process count alleges that the government’s 2016 policy and the plaintiffs’ reliance on that policy in coming out as transgender “created a protected interest” that cannot be deprived without due process of law, and that the Trump administration policy shift is arbitrary and lacks any rational basis. Finally, the complaint argues that the government is estopped from reversing the policy because of plaintiffs’ justified reliance on the 2016 policy shift.

The bulk of the complaint recounts the deliberative process that began in 2014 under Defense Secretary Chuck Hagel and culminated in Defense Secretary Ash Carter’s 2016 announcement that transgender Americans would be permitted to serve openly effective immediately. In mid-2014, the Department of Defense lifted the categorical ban on transgender persons serving openly in the military and directed each branch to conduct its own assessment of whether such a ban was justified.

In July 2015, the Department announced a comprehensive review of the policy. That comprehensive review spanned nearly a year, examined an array of data, and drew from military and medical expertise. The Department reviewed the effects of trans military personnel serving openly in eighteen other countries, and commissioned a study by the RAND Corporation, which concluded that open transgender military service would “cost little and have no significant impact on unit readiness.” As the complaint explains, at the end of this year-long study, the Department “concluded that the needs of the military would be best served by permitting openly transgender people to serve,” and Secretary Carter laid out the reasons in his remarks announcing the new policy. The Department then produced extensive guidance, including a 71-page implementation handbook, on the policy.

This focus on the deliberative process that led to the Obama administration’s transgender policy shift in 2016 is notable for the reasons identified by Michel Paradis in a Lawfare piece predicting success for transgender servicemembers challenging an eventual ban arising from Trump’s tweets. Paradis wrote:

At first blush, a presidential directive barring transgender service-members would seem to fall into this area of heightened (near absolute) deference. If the President determines that the sacrifices made by transgender service-members are unwelcome in the American military, it may be unwise and discriminatory, but it is not unconstitutional because Commander-in-Chief is allowed to be unwise and discriminatory with the military. But the first blush, in this case, would be wrong. The principle reason is that the president and Congress cannot, even when acting together on issues relating to the military, discriminate invidiously. It was a case upholding gender discrimination that established this principle. In 1981, in Rostker v. Goldberg, the Supreme Court said it was constitutional for Congress to require men, but not women, to register for the draft. But in doing so, the Court started from the foundational premise that Congress is not “free to disregard the Constitution when it acts in the area of military affairs” and is not free to discriminate by “arbitrarily choosing to burden one of two similarly situated groups, such as would be the case with an all-black or all-white, or an all-Catholic or all-Lutheran, or an all-Republican or all-Democratic registration.” It was only because the political branches had engaged in an extensive deliberative process, which led them to conclude that men and women were not similarly situated, that women could be exempted from the draft.

Paradis highlighted the similarities to the travel ban litigation:

Like the immigration power, it is difficult to name an area of executive power that has historically been less constrained by judicial review. It is remarkable how blindly the President will have forfeited the vast reservoir of discretion that the executive branch has earned over the last fifty years. But that is clearly what should happen here and very likely what will happen. Under the Supreme Court’s decision in Rostker, the political branches may discriminate in the military in ways that would be unacceptable in ordinary life. But they must do their due diligence first. That attention to process made Don’t Ask Don’t Tell impervious to constitutional attack for two decades. And Secretary Carter’s attention to process in allowing transgender service-members to serve openly is likely to prove itself to be as impervious to President Trump’s most recent tweet storm.

Beyond laying out a plain statement of the facts and claim for relief, the 15-page complaint paints one picture with very clear contrast: the initial policy change was thoughtful, deliberative, and precise. Trump’s tweets and subsequent translation of those tweets into policy were impulsive, careless, and arbitrary.