FBI Director James Comey testifies before a House Homeland Security Committee hearing on Capitol Hill on July 14, 2016. (Jonathan Ernst/Reuters)

James B. Comey’s memoir surged to the top of Amazon’s bestseller list over the weekend after President Trump attacked the former FBI director in a string of angry tweets — and the book isn’t even published yet.

“A Higher Loyalty: Truth, Lies, and Leadership,” due for release April 17, had already been hovering in the top 20 in the months since going up for preorder. But it got an unexpected bump when Trump lashed out at Comey, jumping from No. 15 on Saturday morning to No. 1 by Sunday evening.

Trump’s decision to fire Comey last May reemerged in the news after Attorney General Jeff Sessions fired FBI Deputy Director Andrew McCabe Friday night shortly before McCabe’s planned retirement.

Trump tweeted his satisfaction with the move, accusing “Sanctimonious James Comey” of covering up “lies and corruption” in the FBI and leaking information to the media. He also blasted special counsel Robert S. Mueller III’s probe of Russian interference in the 2016 election, which was triggered by Comey’s ouster, saying there should never have been an investigation. (The Washington Post’s Glenn Kessler has given a detailed breakdown of inaccuracies and misleading statements in Trump’s weekend tweetstorm, which also targeted other officials.)

Among other things, Trump criticized Comey’s practice as FBI director of writing memos about his conversations with the president. “Can we call them Fake Memos?” Trump tweeted. Comey is expected to discuss the substance of some of his meetings with Trump in “A Higher Loyalty,” though almost nothing about the book’s contents has been revealed publicly.

Comey responded to some of Trump’s attacks on Saturday with what read like a subtle plug for the memoir.

“Mr. President, the American people will hear my story very soon. And they can judge for themselves who is honorable and who is not,” he tweeted.

As of early Monday morning, “A Higher Loyalty” still held Amazon’s No. 1 spot, trailed by “Russian Roulette: The Inside Story of Putin’s War on America and the Election of Donald Trump” by Michael Isikoff and David Corn. Also in the top 10 were “A Wrinkle in Time,” Madeleine L’Engle’s fantasy novel that was recently released as a blockbuster film, and “A Brief History of Time” by Stephen Hawking, the renowned theoretical physicist who died last week. (Amazon founder Jeffrey P. Bezos owns The Washington Post.)

There has been little doubt about Comey’s book flying off the shelves. Intrigue has been building since last summer when his literary agents revealed he had begun work on a manuscript.

Comey has occasionally teased the book on social media. He recently tweeted a picture of himself recording the audiobook version, along with the caption “Lordy, this time there will be a tape,” a reference to Trump’s suggestion that he had recorded his interactions with Comey.

The last inside account of the Trump administration, “Fire and Fury: Inside the Trump White House,” created a frenzy in Washington when it dropped in early January. The book by Michael Wolff, which has been criticized for inaccuracies, debuted at No. 1 on the New York Times bestseller list and remains the list’s top-selling hardcover nonfiction book.

The publisher of Comey’s memoir, Flatiron Books, says Comey will share “never-before-told experiences from some of the highest-stakes situations of his career” and offer an “unprecedented entry into the corridors of power.”

Flatiron is taking extraordinary precautions to prevent any leaks, as Politico reported last week. Rather than circulating print drafts, the publisher is using a password-protected electronic system allowing only those involved in the project to access it. The book is also being stored under a code name, and warehouse workers who ship it will be asked to sign nondisclosure agreements, according to Politico.

A national book tour is scheduled for April and May, according to Axios. Comey has also announced television appearances with ABC News’s “20/20,” CBS’s “The Late Show With Stephen Colbert” and ABC’s “The View.”

More from Morning Mix:

Fourth Austin package explosion this month possibly detonated by trip wire, leaving 2 injured, police say