Mr. Wray said he was working to ensure that politics stayed out of the F.B.I.’s investigations.

“I am emphasizing in every audience I can inside the bureau that our decisions need to be made based on nothing other than the facts and the law and our rules and our processes and our core values and not based on any political considerations by any side of the aisle,” he said.

Another Republican, Matt Gaetz of Florida, pointed out that a senior prosecutor on Mr. Mueller’s team, Andrew Weissmann, had praised Sally Q. Yates, the former deputy attorney general who defied Mr. Trump over his travel ban and was fired. Mr. Gaetz wondered whether Mr. Weissmann’s actions demonstrated political bias.

Representative Louie Gohmert, a Texas Republican, even attacked Mr. Mueller, who served both Republican and Democratic presidents as F.B.I. director and is usually held in high regard by politicians. Mr. Gohmert said that Mr. Mueller had weakened the F.B.I. because of bad management decisions he made as director.

Mr. Wray said the bureau would not hesitate to hold people responsible after the Justice Department’s inspector general finished its lengthy review of how James B. Comey, the former F.B.I. director whom Mr. Trump fired in May, and others handled the Clinton investigation.

The results of that review are expected next year. Mr. Wray said he had not witnessed any political bias among his top lieutenants, most of whom are holdovers from Mr. Comey’s tenure.

Mr. Wray had hoped to keep the F.B.I. out of the headlines, taking a low-key approach to running the country’s premier law enforcement agency. But the F.B.I. has been repeatedly thrust back into the spotlight as a frequent target of Mr. Trump’s ire, who also tweeted over the weekend that the bureau’s reputation was the “worst in History!”

Sarah Huckabee Sanders, the White House press secretary, said on Thursday that the president supports the rank-and-file of the F.B.I. but that he takes exception to many of the current leaders of the F.B.I., “particularly those that played politics with the Hillary Clinton email probe,” as well as Mr. Comey.