The Federal Bureau of Investigation was established in 1908 when the Justice Department created an agency to conduct investigations for it. The first leaders of the F.B.I., known then as chief examiners, were appointed by the attorney general. That custom remained until 1972, when the F.B.I. director, J. Edgar Hoover, died in office after overseeing the bureau for 48 years.

In the years before Hoover’s death, a new confirmation process for the F.B.I. director was developed. After Hoover, the director was nominated by the president and confirmed by the Senate. In 1976, it became law that the director would be limited to a 10-year term.

In its 109-year history, only one F.B.I. director had been fired — until Tuesday, when President Trump fired James B. Comey. In July 1993, President Bill Clinton fired William S. Sessions, who had been nominated to the post by President Ronald Reagan in 1987. Mr. Clinton said his attorney general, Janet Reno, reviewed Mr. Sessions’s leadership and concluded “in no uncertain terms that he can no longer effectively lead the bureau.”