James B. Comey, who was ousted today as FBI director by President Trump, learned about his firing from a TV news report while speaking with FBI agents in Los Angeles, according to an FBI source.

"He was caught flat-footed," said the source, who spoke on condition of anonymity.

Comey was surprised by the news but kept talking to the agents, the source said. Another source said that once the news flashed on the screen, Comey was ushered off into another room to meet with aides.

Comey was set to speak Tuesday night at an FBI recruiting event in Hollywood. But the source said that in the wake of his firing, Comey will not go forward with the program. TV coverage showed Comey boarding a jet at Los Angeles International Airport. The jet took off about 6 p.m. and was headed for Washington D.C., according to the plane’s flight plan.

More than two dozen reporters were standing outside the Directors Guild of America, where the event was taking place, awaiting Comey.

The source said Comey was at both the FBI's Los Angeles field office and the DGA building Tuesday.

Deirdre L. Fike, the assistant director in charge of the FBI in Los Angeles, did not discuss Comey's dismissal during her opening remarks at an event aimed at recruiting more minorities into the agency on Tuesday night. She said the director, whose name was still listed on a PowerPoint presentation detailing speakers at the event, had to "return to Washington unexpectedly."

Fike did praise Comey for making diversity a cornerstone of the FBI's recruitment proceedings in recent years.

"No matter who leads the agency, our mission remains the same," she said.

In announcing Comey’s firing, Trump said the move was necessary to allow a "new beginning" at the FBI.

Meanwhile, the FBI director has been widely criticized by people in both parties for his handling of investigations connected to the election — the Russia inquiry as well as the probe into Hillary Clinton's email practices while she was secretary of State.