Why was FBI Director James Comey fired?

Photo of James Comey in San Bernardino, March 30, 2016. (Courtesy of tua ulamac)