But the Justice Department’s inspector general, Michael E. Horowitz, uncovered that the F.B.I. had cherry-picked and misstated evidence about the Trump adviser, Carter Page, when seeking permission to wiretap him in October 2016 and in 2017 renewal applications. At the same time, Mr. Horowitz determined that the opening of the Russia investigation was legal and found no politicized conspiracy against President Trump by high-level F.B.I. officials.

The problems included omitting details that made Mr. Page look less suspicious. For example, the court was not told that Mr. Page had said to a confidential informant in August 2016 that he had no interactions with Paul Manafort, Mr. Trump’s former campaign manager, even though the F.B.I. suspected Mr. Page might be a conduit between Russia and Mr. Manafort.

The court was also not told that Mr. Page had told the C.I.A. about his contacts with Russians over the years, a fact that made that pattern of contacts look less suspicious. The Justice Department, passing on the factual portrait it received from the F.B.I., had pointed the judges to that pattern as a reason to think that he might be a Russian agent.

Mr. Horowitz said he did not find documentary or testimonial evidence that the F.B.I. officials responsible for compiling the relevant evidence about Mr. Page for the court were politically biased against Mr. Trump. But he rejected as unsatisfactory their explanations that they were busy on other aspects of the Russia investigation.

In a response appended to the inspector general report last month, Mr. Wray had already announced that he would make changes aimed at ensuring that the bureau put forward a more comprehensive portrait of the facts about targets when preparing wiretap applications.