He was standing in the middle of the Los Angeles F.B.I. field office on May 9, 2017, thanking employees and the building’s support staff for their hard work, when he saw the televisions on the wall flash “Comey Resigns.”

“One of the many great things about the F.B.I. is we have some hilarious pranksters in that organization, and so I thought it was a scam by someone on my staff. So I turn to them and I said, ‘Someone put a lot of work into that.’ And then I continued talking,” Comey told ABC News’ chief anchor George Stephanopoulos in an exclusive interview.

What Comey soon came to realize was that it wasn’t a joke, and that his tenure as Federal Bureau of Investigation director had come to an unceremonious end after President Donald Trump abruptly fired him.

As the televisions in the bureau started to show the news on other networks, he saw some were displaying the words “Comey Fired.”

“The audience could see my face change,” Comey said.

“I said, ‘Look, I don’t know whether that’s true or not. I’m gonna go find out,” he recalled telling the staff. “‘But what I want to say to you won’t change whether or not that’s true.’

A Higher Loyalty: Truth, Lies, and Leadership by James Comey

“And then I finished talking about the mission of the FBI, how everybody has to be part of it,” he told Stephanopoulos. “And I thanked them for their work, I shook all their hands, then I went into a room to find out have I been fired, because I did not expect to be fired.” Comey opened up about the moment he learned he was fired in the interview with Stephanopoulos ahead of the release of his book, “A Higher Loyalty: Truth, Lies and Leadership” which goes on sale on April 17.

The news of the firing took Comey on a roller coaster of emotions that ended with him drinking a California pinot noir out of a coffee cup and sitting in the plane’s cockpit to see the nation’s capital as he hit the end of his career in public service.

Comey told Stephanopoulos the first official confirmation of his firing that he received was a letter from the White House hand-delivered to the FBI headquarters in D.C. His assistant had to arrange to get the letter picked up, scanned and emailed to him in L.A., which he said “took probably a half hour or so.”

He said his reaction to the news was disbelief.

“That’s crazy,” he said of finding out he was fired. “How could that be?”

“They also, I think, attached to it a letter from the attorney general and a letter from the deputy attorney general, purporting to lay out the reasons I was fired. And so I think … I saw those actually [at] the same time, and my reaction was, ‘That makes no sense at all,’” he told Stephanopoulos.

In addition to receiving a confused call from his wife Patrice, who had heard that…