James Comey was getting ready to give a speech in Los Angeles when he learned he was fired as the FBI director — from the television.

And he thought it was a prank.

Comey was "caught flat-footed," when he looked up and saw on TV that he was fired, according to the Los Angeles Times.

Comey was speaking to FBI agents at a recruiting event and was set to give a speech shortly after. When he saw the news report on TV, he allegedly laughed and said he thought it was a fairly funny prank.

He was then ushered into an office by staff, who confirmed to him that he had been fired. He had not heard from the White House before seeing the television report.

Comey, whose day began in Florida speaking to police officers, did not give his speech in Los Angeles.

President Trump unexpectedly fired Comey late Tuesday, after a finding by the Justice Department that he mishandled the investigation into Hillary Clinton's emails last year.

Trump said he acted based on the recommendations of Attorney General Jeff Sessions and Deputy Attorney General Rod Rosenstein, who found that Comey's improperly moved to "usurp" the attorney general's authority and decided not to prosecute Clinton.