(Bloomberg) -- A U.S. judge said President Donald Trump doesn’t need to hand over evidence that would shed light on why he sent tweets in 2017 banning transgender Americans from serving in the military.

The ruling Friday by U.S. District Judge Colleen Kollar-Kotelly in Washington blocks efforts of plaintiffs who allege Trump’s ban was a unilateral decision made to score political points and wasn’t based on talks with generals and military experts as he claimed in the tweets.

However, Kollar-Kotelly said the plaintiffs can see evidence on how former defense secretary Jim Mattis crafted the final ban, which was less restrictive than what Trump had tweeted. The judge ruled the documents and internal discussion on the ban aren’t protected by the so-called deliberative-process privilege. Plaintiffs called that part of the ruling a major victory.

The decision comes eight months after the U.S. Supreme Court gave Trump a key victory by letting the ban take effect while it is being litigated. The president has argued the ban is needed to protect morale, save “tremendous” amounts of money and keep the military focused on “overwhelming victory.”

The administration’s policy was dealt an earlier blow last month after a judge in a parallel case declined to dismiss the lawsuit, finding the ban is subject to an equal-protection claim because it discriminates based on transgender status rather than a medical condition.

To contact the reporter on this story: Erik Larson in New York at elarson4@bloomberg.net

To contact the editors responsible for this story: David Glovin at dglovin@bloomberg.net, Steve Stroth

©2019 Bloomberg L.P.