NEW YORK • The US 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 FBI, known then as chief examiners, were appointed by the attorney-general.
That custom remained until 1972, when FBI director J. Edgar Hoover died in office after overseeing the bureau for 48 years.
In the years before Mr Hoover's death, a new confirmation process for the FBI director was developed.
After Mr 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 FBI director had been fired - until Tuesday, when President Donald Trump fired Mr James Comey.
In July 1993, then President Bill Clinton fired Mr William Sessions, who had been nominated to the director post by former president Ronald Reagan in 1987. Mr Clinton said his attorney-general, Ms Janet Reno, had reviewed Mr Sessions' leadership and concluded "in no uncertain terms that he can no longer effectively lead the bureau".
Mr Sessions had been cited for ethical lapses, including taking free trips on FBI aircraft and using government money to build a US$10,000 fence at his home. Mr Sessions was asked to resign, and was fired when he refused to do so.
Similarly, Mr Trump fired Mr Comey on the recommendation of Attorney-General Jeff Sessions.
There are no US statutes that discuss the president's authority to remove the FBI director, but the sacking of Mr Comey also brought to mind for many the so-called Saturday Night Massacre.
On Oct 20, 1973, former president Richard Nixon, seeking to fire Mr Archibald Cox, the special prosecutor leading the Watergate investigation, accepted the resignations of then Attorney-General Elliot Richardson and Deputy Attorney-General William Ruckelshaus after they refused to take action.
Mr Robert Bork, the solicitor-general, complied with the president's order to fire Mr Cox. Mr Nixon also abolished the special prosecutor's office, but did not fire the FBI director.
Mr Comey was in the fourth year of his 10-year term.
The term limits were imposed after Watergate; only one director, Mr Robert Mueller III, was allowed to serve beyond 10 years.
Mr Mueller, who became director just before the terrorist attacks of Sept 11, 2001, was asked by former president Barack Obama to stay on an additional two years, citing "ongoing threats facing the United States". The Senate unanimously approved the extension.