WHITE PLAINS, N.Y. — The book is officially fiction: the story of a president who disappears as he tries to prevent an apocalyptic cyberattack.

The authors, Bill Clinton and James Patterson, swear it could happen.

“You’re asking the Secret Service, in effect, to walk away from their duty,” the former president said during a recent interview at the Ritz-Carlton Hotel as he and Patterson discussed “The President Is Missing,” the thriller they worked on together that comes out this week. “(But) it could happen. If you were determined to do it, you could do it.”

“A big piece of (the novel) was getting him out of the White House,” Patterson said. “It would be irresponsible, but under the circumstances it was the responsible thing to do.”

Prodded to collaborate by Washington attorney Robert Barnett, who handles book deals for both of them, Clinton and Patterson drew on their respective backgrounds in completing a 500-page novel that topped Amazon’s best-seller list before publication. Patterson is among the world’s most popular and prolific fiction writers, and the novel is a characteristically fast-paced narrative, with brief chapters and dramatic plot turns.

Clinton, a newcomer to novel writing whose previous books include the million-selling autobiography “My Life,” didn’t need a lot of research to tell readers what it’s like to sit inside the White House Situation Room or to be briefed on a possible terrorist attack, or to imagine slipping away entirely.

“Jim wanted it to be authentic,” Clinton said. “Which means: A, the physical setting has to be authentic. B, the procedures had to be authentic, and the interplay between the president and the staff and all the world leaders and everything had to have the feel of reality, and even how the Secret Service works.”

The story line will surely revive an historic low point of his White House years, when he was impeached in 1998 by the House of Representatives, but acquitted by the Senate, on charges stemming in part from his affair with White House intern Monica Lewinsky. The scandal was already back in the news earlier this year, with Lewinsky writing that the #MeToo movement compelled her to look upon that time through a “new lens.”