"Speculation." "Unofficial information." "Political statements rather than assertions of pure fact."

Those are words federal judges have used to describe President Donald Trump’s tweets while guarding the secrecy of ongoing investigations that have shadowed his presidency.

And in an unusual twist, these rulings mark victories for Trump’s own Justice Department, which has argued repeatedly that the president’s comments on the probes are not always to be taken literally or to be trusted.

In one tweet in March 2017, Trump claimed that the Obama administration tapped his phones as a candidate in Trump Tower. He insisted in May 2017 that he had the "absolute right" to meet with Russians in the Oval Office, even if critics worried he revealed state secrets. And he announced in June 2017 that he was under investigation for firing the FBI director.

Presidents don't tend to announce they are under investigation.

Trump's voluminous tweeting and other public statements offer regular insight into his thinking – and his disregard for the secrecy that traditionally surrounds national security issues.

But his administration has repeatedly, and successfully, urged federal judges to find that his comments are not reason enough to force the government to give up documents that would confirm whether what he is saying is true.

“Because the president’s tweet amounts to speculation, it does not” require agencies to acknowledge whether documents exist, U.S. District Judge Amy Berman Jackson ruled in a case concerning whether Trump was under investigation.

"As already discussed, the president's statements may very well be based on media reports or his own personal knowledge, or could simply be viewed as political statements intended to counter media accounts about the Russia investigation, rather than assertions of pure fact," U.S. District Judge Amit Mehta ruled in a case seeking release of the government synopsis of a dossier of information about Trump.

Those conclusions – that the president’s statements on national security are not always to be taken literally or to be trusted – are legal victories for his Justice Department, which has argued repeatedly that the president’s public comments are no reason to force the government to divulge its national security secrets.

More:'I know Putin': How a drumbeat of 2018 revelations shadows Trump's presidency

More:'I don't think he tells the truth': Retired Gen. Stanley McChrystal says Trump is immoral

On Nov. 30, government lawyers argued in another case before Mehta that Trump’s tweets complaining about surveillance of a campaign aide were nothing more than “generalized, vague allegations of misconduct based on no personal knowledge."

"There is no evidence that he was formally overruling agency determinations via tweeted quotation of Fox & Friends," department lawyers wrote.

What’s more, the lawyers wrote, when Trump quotes someone else on Twitter accusing the government of misconduct, that “cannot be assumed to be his confirmation of the media reporting based on government information, and it is not evidence of government misconduct.”

Despite Trump’s affinity for weighing in on sensitive matters, judges in several cases have repeatedly sided with the department and the FBI in refusing to acknowledge whether documents even exist. But legal experts said it was rare for a president to publicly discuss secret records.

"It's extremely unusual for a president to do things like this – actually, it's unheard-of," said Ian Samuel, a former Justice Department lawyer who is now an associate professor of law at Indiana University.

Trump's tweets created headaches in other cases, such as court challenges to block immigration from majority-Muslim countries. Neal Katyal, a former acting solicitor general, said he hadn't sought help from Trump in fighting the president's travel ban, but welcomed it.

The documents at stake in at least four court battles deal with investigations of the Trump administration, including the foundation for Justice Department special counsel Robert Mueller’s probe of Russian interference in the 2016 election.

The rulings came in cases filed under the Freedom of Information Act (FOIA), which allows members of the public to request government documents. Ordinarily, the government has wide latitude to reject requests for national-security information or records about ongoing investigations. But media outlets and nonprofits have argued that the president’s comments on those issues undermined the government’s basis for keeping them secret.

"Trump simply wades in on these matters to a far greater degree than his predecessors would have done, and that has opened the doors for arguments of official disclosure that otherwise would not be viable," said Bradley Moss, a lawyer at the James Madison Project who represents reporters in the cases, including USA TODAY.

Government officials often won’t even confirm that an investigative document exists, such as in a case of a warrant for a secret surveillance. Agencies such as the FBI and CIA routinely deny access to records about their activities by referring to Executive Order 13526. That order says an agency may withhold any information if its “unauthorized disclosure could reasonably be expected to cause identifiable or describable damage to national security.”

The U.S. Circuit Court of Appeals for the D.C. Circuit established a strict test to determine whether documents should be disclosed under FOIA. The reasons include the information having been previously released, matching information that was previously disclosed or that was already made public through an official and documented disclosure.

In tweets and comments, Trump didn't just reveal that documents exist. He described how, in his view, they exonerated him. His statements kept alive cases demanding documents that might otherwise have been swiftly dispatched.

Samuel, who argued a FOIA appeal about anti-terrorism efforts during the 2004 election, said government lawyers are cautious about revelations because they can't be taken back.

"We had to choose the words in our briefs (and at my oral argument) incredibly carefully, and the idea that then-President Obama (or even President Bush) would have undercut us by hinting at the answer never frankly occurred to us," Samuel said. "Then again, if the president is going to do the acknowledging for you, maybe it doesn't achieve anything after all."

Was Trump under investigation?

One case began after Trump fired FBI Director James Comey on May 9, 2017. Josh Gerstein, a reporter at Politico, requested FBI documents about whether Trump “is or ever was a target of, subject of or material witness to any investigation."

Trump released a letter saying that Comey “had informed him on three separate occasions that he (President Trump) was not under investigation.”

But later Trump tweeted that he was under investigation – unfairly.

“I am being investigated for firing the FBI director by the man who told me to fire the FBI Director!” Trump tweeted June 16, 2017.

House Democrats on the Intelligence Committee issued a memo about Russian interference with the 2016 election on Feb. 24, 2018, which Trump had declassified. “FISA was not used to spy on Trump or his campaign,” the memo said.

None of that mattered for releasing the documents.

“As stated before, a presidential statement premised on unofficial information, such as a news story, is not an official acknowledgement,” Jackson wrote.

What happened at Oval Office meeting with Russians?

Another case focused on a meeting May 10, 2017, that Trump held in the Oval Office with Russian officials including Ambassador Sergey Kislyak and Foreign Minister Sergey Lavrov.

News reports suggested that Trump may have disclosed classified information to the Russians about where intelligence from Syria originated or that Israel provided information. H.R. McMaster, who was then national security adviser, denied Trump revealed any secrets while talking about fighting terrorism.

The Daily Beast online publication requested documents about the meeting from the CIA, FBI and other agencies. But the agencies refused to even confirm or deny any records about the meeting existed.

Trump tweeted May 16, 2017, that he had “the absolute right” to meet with Russians to discuss terrorism and airline security, along with asking Russia to step up their fight against the Islamic State and terrorism. Trump also stated during a press appearance in Israel on May 22 that he “never mentioned the word or the name of Israel” while meeting with the Russians.

Jackson rejected the document request by finding that FBI, CIA and National Security Agency hadn’t revealed “their involvement in the meeting or in preparing for the meeting.”

“McMaster’s description of the limits of the president’s knowledge does not open the door to a fishing expedition into which, if any, of the three defendant agencies that has raised undisputed national security concerns participated in a briefing, or created or retained materials relating to its subject matter,” Jackson wrote.

Was Trump's campaign under surveillance?

Brad Heath, a reporter at USA TODAY, requested documents from Justice and the FBI about whether a Foreign Intelligence Surveillance Court authorized surveillance of Trump, his presidential campaign or the Trump Organization.

The court's documents are some of the most secret and sensitive in the government. But a series of four Trump tweets on March 4, 2017, complained about wire-tapping.

“Just found out that Obama had my ‘wires tapped’ in Trump Tower just before the victory,” Trump tweeted, which he later called a “NEW LOW!”

Justice lawyers said Trump's four-part post didn't confirm that documents exist.

"As discussed above, DOJ – through the testimony of then-FBI Director James Comey – has confirmed that it has no records that support his statement," department lawyers said.

Trump tweeted Nov. 29, 2017, that the House sought contempt citations against Justice and FBI for withholding documents: "Big stuff. Deep State. Give this information NOW!" Trump tweeted against July 23 that the refusal to release documents "was classified to cover up misconduct by the FBI and the Justice Department" to get the warrant.

But Justice lawyers said there was no formal order to release documents.

"There is no presidential declassification order, and the president has publicly indicated that he is not requiring declassification at this time, much less full disclosure," department lawyers said in their filing.

The surveillance case is still pending.

How did authorities summarize the Steele dossier?

Despite multiple court rejections, one case cracked the door for obtaining documents.

The case focused on the 35-page dossier prepared in 2016 by former British intelligence officer Christopher Steele about alleged ties between Russia and then-presidential candidate Trump.

Intelligence officials briefed Trump about the dossier before he was sworn in, in January 2017. Gerstein requested the two-page synopsis of the dossier and any “final determinations” about what might be true or false in the report.

The CIA and National Security Agency said they had the synopsis but refused to release it. But the FBI refused to even acknowledge its existence.

Trump tweeted repeatedly that the dossier was discredited, phony, fake, false or bogus. He told New York Times reporters that Comey “brought it (the dossier) to me.”

Judge Mehta initially ruled that Trump hadn’t explicitly said Comey brought him the synopsis rather than the full dossier. The information in the tweets could have been gleaned from news reports rather than government records.

“This is not hair-splitting,” Mehta ruled Jan. 4, 2018. “Plaintiffs offer little more than wishful thinking that the documents they request must exist. But wishful thinking does not create a genuine dispute of fact in a FOIA case.”

While the case was on appeal, Trump declassified a memo from House Republicans on the Intelligence Committee that said Comey briefed Trump on a summary of the Steele dossier even though it was “salacious and unverified.”

“The FBI therefore can no longer assert” its blanket denial of whether the document exists or not, Mehta ruled Aug. 16, 2018. “It will be up to the FBI to determine which of the records in its possession relating to the reliability of the Dossier concerns Steele’s reporting as discussed in the synopsis.”

The FBI released a highly redacted version of the synopsis Dec. 14. The synopsis said an FBI source who was a former worker at a "friendly foreign intelligence service" volunteered "highly politically sensitive information."

Mehta told both sides in the case to confer and decide by Jan. 7 whether there are any lingering disputes.