Current and former Justice Department officials expressed a range of reactions to the speech, from outrage to mild disappointment to curiosity about whether the attorney general is trying to send a message about action in future cases. Some said Barr was attacking the institution he leads, seemingly ignoring that Trump, perhaps more than anyone, has pushed for charges against those he considers political foes.

“He need look no further than to Pennsylvania Avenue,” said one career Justice Department employee, speaking on the condition of anonymity to criticize a superior.

But some people close to the attorney general said Barr’s speech was meant not just as a rejoinder to those on the left who have criticized his moves on cases involving Trump associates, including former national security adviser Michael Flynn and longtime friend Roger Stone. Barr was also gingerly trying to temper conservatives’ hopes that, before Election Day, former senior officials once involved in investigating the president will be charged criminally, people familiar with the matter said.