Two top F.B.I. aides who worked alongside the former director James B. Comey as he navigated one of the most politically tumultuous periods in the bureau’s history resigned on Friday.

One of them, James A. Baker, was one of Mr. Comey’s closest confidants. He served as the F.B.I.’s top lawyer until December when he was reassigned as the new director, Christopher A. Wray, began installing his own advisers. Mr. Baker had been investigated by the Justice Department on suspicion of sharing classified information with reporters. He has not been charged.

The other aide, Lisa Page, advised Mr. Comey while serving directly under his deputy, Andrew G. McCabe. She was assailed by conservatives after texts that she had exchanged with the agent overseeing the investigation into links between President Trump’s campaign and Russia were made public. In the messages, they expressed anti-Trump views but took aim at Hillary Clinton and other political figures as well.

The decisions by Mr. Baker and Ms. Page to leave the bureau were unrelated. Mr. Baker said in a telephone interview that he would be joining the Brookings Institution to write for Lawfare, its blog focused on national security law.

“I love the F.B.I.,” he said. “I have tremendous respect for the bureau — the F.B.I. was great, is great and will be great.”

Mr. Comey relied heavily on Mr. Baker as he oversaw the politically charged investigations into Mrs. Clinton’s private email server and Mr. Trump’s campaign. After the president pressed Mr. Comey to say publicly that he was not under investigation, Mr. Baker cautioned against it because he anticipated that the F.B.I. would eventually have to examine Mr. Trump’s ties to Russia.

This story is developing.

READ MORE: