WASHINGTON — A federal judge on Thursday sharply rebuked Attorney General William Barr’s handling of the special counsel’s Russia report, saying Barr had made “misleading public statements” to spin the investigation’s findings in favor of President Donald Trump and had shown a “lack of candor.”

U.S. District Judge Reggie Walton delivered the criticism in a 23-page order in which he directed the Justice Department to give him an unredacted version of the Mueller report so that he could decide if any additional information from the document could be publicly disclosed.

The scolding from the judge was unusually blunt, with Walton saying Barr appeared to make a “calculated attempt” to influence public debate about the report in ways favorable to the president. The rebuke tapped into lingering criticism of Barr, from Democrats in Congress and Mueller himself, that he had misrepresented some of the most damning findings from the two-year investigation.

The Justice Department in April released a 448-page redacted version of Mueller’s report, which examined ties between Russia and the 2016 presidential campaign and potential obstruction of justice by the president. BuzzFeed News and the Electronic Privacy Information Center later sued under the Freedom of Information Act for access to the entire document.

In his ruling, Walton said he needed to review the entire document itself because he could not trust that the Justice Department’s redactions of the report were made properly and in good faith. The judge said it would be “disingenuous” of him to presume the redactions were “not tainted by Attorney General Barr’s actions and representations” throughout the process.

The actions cited by the judge include Barr’s release last March of a four-page summary of Mueller’s findings. The letter said that Mueller had found insufficient evidence to establish a criminal conspiracy between the Trump campaign and Russia to tip the 2016 election, and that Mueller had not reached a determination on the question of whether the president had obstructed to justice.

Mueller complained to Barr in a private letter and phone call that he had not adequately captured the seriousness of his report’s conclusions. He stressed in his report, and in later public statements, that he did not exonerate the president and that it was not an option to charge Trump because of longstanding policy that sitting presidents cannot be indicted.

Barr, for his part, has defended his handling of the report, calling Mueller’s letter to him “a bit snitty.” He said it was his prerogative as attorney general to give a quick summary of the report, which he referred to as “my baby,” while his staff spent weeks on redactions.

The judge said he struggled to reconcile Barr’s public characterizations of the report — which included his statement that Mueller found “no collusion” between the Trump campaign and Russia — with what the document actually said.

Those inconsistencies, Walton wrote, “cause the Court to seriously question whether Attorney General Barr made a calculated attempt to influence public discourse about the Mueller Report in favor of President Trump despite certain findings in the redacted version of the Mueller Report to the contrary.”