A federal judge in Virginia on Friday sharply questioned the motivations of special counsel Robert S. Mueller III’s fraud prosecution of President Trump’s former campaign manager, saying it was aimed at getting him to provide evidence against the president.

Judge T.S. Ellis III’s comments came during a hearing in Alexandria federal court, where attorneys for Paul Manafort argued that bank- and tax-fraud charges against him are outside the scope of the special counsel’s authority. While the judge has yet to rule and indicated that he may well decide in favor of prosecutors, his scrutiny of their approach quickly became a rallying cry for supporters of the president.

“You don’t really care about Mr. Manafort’s bank fraud,” said Ellis, who is known for being combative with attorneys in his courtroom. “You really care about getting information Mr. Manafort can give you that would reflect on Mr. Trump and lead to his prosecution or impeachment.”

Ellis said the special counsel, which is investigating Russian interference in the 2016 election, wanted Manafort, “the vernacular is, to sing.” The judge also put it another way, saying the office set out to “turn the screws and get the information you really want.”

The comments earned quick praise from Trump, who said from the stage at a National Rifle Association event in Dallas, “I’ve been saying that for a long time — it’s a witch hunt.”

Trump called Manafort a “very nice guy” and said that “all we hear about is this phony Russia witch hunt.”

Manafort, 69, is accused in federal court in both Alexandria and the District of Columbia of crimes related to his work for a pro-Russian political party in Ukraine.

Deputy Solicitor General Michael Dreeben did not respond specifically to the judge’s assertions in court. But he said the investigation fit naturally into a probe of Trump campaign ties to Russia: “In trying to understand the actions of Mr. Manafort in Ukraine and the association he had with Russian individuals and the depths of those financial relationships, we had to follow the money where it led.”

Manafort’s attorneys contend that their client’s alleged crimes in Virginia have nothing to do with the election or with Trump.

Ellis agreed, emphasizing that some of the charges involve purported conduct that occurred over a decade ago. But he made no immediate decision on the defense motion to dismiss the case. The judge said that even without such a connection, the special counsel may well still have the authority to bring the charges.

Ellis suggested that if he ruled in Manafort’s favor, the case could simply be returned to the U.S. attorney’s office for the Eastern District of Virginia.

It is precisely because the probe into Manafort’s financial dealings began years ago with federal prosecutors in that office, Manafort’s defense attorneys argued, that the special counsel should not be involved.

“This doesn’t make any sense,” defense attorney Kevin Downing said in court. “It’s so unrelated,” he said, “as to be in violation” of the special counsel’s mandate.

Dreeben responded in court that the Manafort investigation has expanded significantly since it was taken over by Mueller. “Our investigation has considerably advanced and deepened our understanding” of Manafort’s actions, he said.

The specific parameters of the special counsel’s investigation have not been publicly revealed, Dreeben said, because to do so would jeopardize ongoing probes and sensitive national security information.

Instead, he said, the scope has been defined in “ongoing discussions” with Deputy Attorney General Rod J. Rosenstein, who oversees the investigation.

Dreeben also referred to an August memorandum from Rosenstein authorizing Mueller to investigate whether Manafort illegally coordinated with Russia in 2016.

Ellis asked for an unredacted version of that memo. Dreeben told the judge that all sections of the memo related to Manafort have been publicly revealed. Significant sections remain classified.

Ellis appeared somewhat sympathetic to that argument as well, comparing Mueller to independent counsels criticized in the past for overreach.

“The American people feel pretty strongly about no one having unfettered power,” he said.

Dreeben countered that the special counsel is part of the Justice Department and thus subject to oversight that addresses such concerns. The tax division and national security division signed off on the Manafort indictment, he said.

“We are not operating with unfettered power,” he said. “We are not separate from the Justice Department.”

In Dallas on Friday, the NRA crowd roared as Trump read aloud from news reports of the morning hearing.

The judge, Trump said, “is really something very special, I hear, from many standpoints. He’s a respected person.”

Ellis was appointed by President Ronald Reagan and took the bench in 1987. He presided over the plea and sentencing of American Taliban supporter John Walker Lindh as well as a case involving government secrets leaked to a pro-Israel lobbying group and Israeli official. Born in Bogota, Colombia, he served as an aviator in the U.S. Navy and has an undergraduate degree from Princeton and law degrees from Harvard and Oxford.

He is known for his sense of humor, his long digressions and his demanding and somewhat confrontational attitude toward the lawyers who appear before him.

“Judge Ellis has high expectations from counsel on both sides of any issue,” said Timothy Belevetz, a former prosecutor in the Eastern District now with the firm Holland & Knight. “His interactions with counsel in the courtroom do not necessarily reflect where he’ll end up coming out, because he’s a thoughtful judge who takes into account and carefully analyzes what’s presented to him. But in the meantime, he probes counsel and does so thoroughly.”

Rick Gates, a former Trump campaign aide who worked with Manafort, has pleaded guilty and agreed to cooperate with the special counsel.

Mueller also has added Uzo Asonye, an attorney from the office of the U.S. attorney for the Eastern District of Virginia, to his legal team.

Ellis noted with pleasure that the fraud prosecutor has appeared before him several times.

“He may tell you some interesting things,” Ellis said.

An earlier version of this story incorrectly said the NRA event was Thursday.