Usually, when an American president announces a policy change, it’s part of a thoughtful, deliberate campaign to win hearts and minds, and is carefully timed and worded. Not so for Donald Trump’s announcement of a ban on transgender soldiers in the military. It was first delivered via Twitter in late July, and in late August formally signed into an executive order.

Today (Oct. 30), a federal judge granted a temporary injunction partially blocking the enforcement of the order, citing Trump’s unusual policy tweets as one of the reasons. Judge Colleen Kollar Kotelly of the US District Court for the District of Columbia issued a lengthy ruling in Jane Doe v. Donald Trump (pdf), finding the plaintiffs were “likely to succeed” on their claims on the merits arguing that the ban is discriminatory. How a judge rules on the “likely-to-succeed” standard for issuing a temporary injunction often (though doesn’t always) predict whether plaintiffs will actually succeed when the case is heard in full.

Officially announced on Aug. 25, Trump’s action would prohibit the military from enlisting transgender individuals and force the discharge of active trans soldiers, reversing a 2016 decision made by the Obama administration to allow trans soldiers to serve openly. The judge agreed with the plaintiffs that they “will be injured by these directives, due both to the inherent inequality they impose, and the risk of discharge and denial of accession that they engender.”

The US Department of Justice had, on behalf of the president, argued that the ban was designed with concern for the workings of the military in mind. In granting the request, Kotelly expressed doubt about the validity of this argument. Quite to the contrary, the judge noted, Trump’s order seemed to undermine a military policy instituted because experts already concluded transgender military service had no adverse effects on the institution or soldiers. The judge writes in her ruling today:

Many transgender service members identified themselves to their commanding officers in reliance on that [Obama administration] pronouncement. Then, the president [Trump] abruptly announced, via Twitter—without any of the formality or deliberative processes that generally accompany the development and announcement of major policy changes that will gravely affect the lives of many Americans—that all transgender individuals would be precluded from participating in the military in any capacity. These circumstances provide additional support for Plaintiffs’ claim that the decision to exclude transgender individuals was not driven by genuine concerns regarding military efficacy.

So far, Trump has not tweeted a reaction to the ruling. Perhaps he got the hint that policy-by-Twitter is not really working; this isn’t the first time that the social-media president has found his own posts cited in cases challenging his most controversial policies. In June and October, federal judges cited Trump’s tweets in rulings for plaintiffs challenging as discriminatory and unconstitutional the president’s thrice-issued ban on travel to the US for people from a handful of predominantly Muslim nations. The travel ban issue is being considered by the US Supreme Court this term.

Steve Vladeck at the University of Texas School of Law told CNN that today’s ruling is significant because it recognizes that “the [US] constitution in some way limits the government’s ability to discriminate against transgendered individuals” and “that the president’s words (and tweets) have consequences, especially when those words are turned into official policy.”

The US justice department argued in its brief opposing the injunction that the plaintiffs’ case should be dismissed altogether but it has yet to announce whether it will appeal the order issued today granting an injunction barring enforcement of the order until the case is resolved. Justice department spokeswoman Lauren Ehrsam told BuzzFeed News, “We disagree with the court’s ruling and are currently evaluating the next steps.”