President Trump sharply attacked James B. Comey in a fusillade of tweets Sunday morning, suggesting that the former FBI director deserves to be imprisoned and serving up several of his favorite theories and unsubstantiated allegations of misdeeds.

Trump’s tweets are part of a wider effort by the White House and the Republican National Committee to discredit Comey, who has written a damaging tell-all book, titled “A Higher Loyalty,” to be released Tuesday. A Sunday night interview on ABC will kick off his national book tour.

Comey’s book is a scathing depiction of his interactions with Trump, whom he likens to an “unethical” mob boss, and casts members of his inner circle in largely unflattering terms, saying they were more focused on politics than national security.

“I honestly never thought these words would ever come out of my mouth, but I don’t know whether the current president of the United States was with prostitutes, peeing on each other in Moscow in 2013,” Comey said, according to an excerpt released by ABC News. “It’s possible, but I don’t know.”

Those allegations about Trump were made in a disputed opposition-research dossier compiled by a former British spy — and have not been proved.

An array of surrogates, including presidential counselor Kellyanne Conway and White House press secretary Sarah Huckabee Sanders, blanketed the airwaves this weekend to undermine Comey, as Trump unleashed a torrent of tweets that were often personal and fact-challenged. Trump allies have often reminded the public of the many Democrats who excoriated Comey in 2016 and frequently labeled him a “liar and a leaker” over his handling of the investigation into Hillary Clinton’s email server issues.

Former FBI director James B. Comey testifies before the Senate Intelligence Committee on Capitol Hill on June 8. (Melina Mara/The Washington Post)

“When the person that is supposed to lead the highest law enforcement agency in our country starts making decisions based on political environments . . . that’s a really dangerous position,” Sanders said on ABC.

Trump fired Comey in May amid a sprawling investigation into Russian interference in the 2016 election and any potential Trump campaign role in it. Comey’s firing spurred the appointment of a special counsel, Robert S. Mueller III, and a broader investigation into Trump’s campaign and administration — a probe that now includes potential obstruction of justice and Trump’s business dealings.

Comey’s book, copies of which were obtained by news outlets and reviewed last week, has caused great agita for Trump. The president also has been infuriated in recent days by the FBI raiding the office and home of Michael Cohen, his personal attorney, a move that some advisers say poses more peril for Trump than the special counsel probe.

Aides were so concerned about Comey’s book that they scheduled Trump to be at his Mar-a-Lago estate for a meeting with Japanese Prime Minister Shinzo Abe at the same time as the book’s release, administration officials said, speaking on the condition of anonymity to describe White House fears about the book. But media outlets obtained the book early.

“The big questions in Comey’s badly reviewed book aren’t answered, like how come he gave up classified information (jail), why did he lie to Congress (jail), why did the DNC refuse to give Server to the FBI (why didn’t they TAKE it), why the phony memos, McCabe’s $700,000 & more?” the president tweeted before 8 a.m. Sunday.

Trump soon added: “Comey throws AG Lynch ‘under the bus!’ Why can’t we all find out what happened on the tarmac in the back of the plane with Wild Bill and Lynch? Was she promised a Supreme Court seat, or AG, in order to lay off Hillary. No golf and grandkids talk (give us all a break)!”

The tweets were filled with unproven assertions.

Comey has not been formally accused of disclosing classified information or lying to Congress.

The memos Trump appears to reference are ones that Comey wrote documenting his meetings and phone calls with the president — which have since become public. Comey asked a friend to give some of those memos to the New York Times, but the memos are not thought to contain classified material. Comey has testified about the memos under oath to Congress. He has alleged that Trump asked him to ease off a probe into fired national security adviser Michael Flynn and wanted complete “loyalty.”

Trump has continued to allege that McCabe was deferential to Hillary Clinton during the FBI’s investigation of her use of a private email server because his wife took donations from a Clinton ally for a state Senate race in Virginia. The accusation is one that McCabe has denied and has never been proved.

McCabe claimed after his firing that he was targeted because he was a witness in Mueller’s probe.

McCabe’s attorney, Michael R. Bromwich, responded Sunday to the president’s claims, tweeting: “1. The book isn’t out so you don’t know what’s in it. 2. The Comey and McCabe memos are very real. 3. The story about ‘McCabe’s $ 700,000’ has been fully explained. . . . 4. Your strategy of attacking beloved former FBI leaders — not smart.”

The president’s tweet about Comey and Loretta E. Lynch appears to refer to a part of the book in which Comey says the then-attorney general was conflicted on the Hillary Clinton investigation because of unspecified classified information that he said he was aware of — and that Lynch wanted him to call the probe a “matter.”

Trump also refers to a meeting that Bill Clinton — whom he calls “Wild Bill” — and Lynch had on a Phoenix tarmac in July 2016 that was seen as questionable, as Lynch was leading the investigation into Hillary Clinton. There is no proof, however, that Bill Clinton offered Lynch a job or a favor to have her ease off the investigation into his wife. The two said that their planes just happened to be on the same tarmac and that they made casual conversation after Clinton asked to come aboard Lynch’s plane.

Trump also attacked Comey for writing that political considerations may have driven him to reopen the Clinton investigation in the final days of the 2016 election campaign. Comey writes that it is possible “my concern about making her an illegitimate president by concealing the restarted investigation bore greater weight than it would have if the election appeared closer or if Donald Trump were ahead in all polls.”

“Unbelievably, James Comey states that Polls, where Crooked Hillary was leading, were a factor in the handling (stupidly) of the Clinton email probe. In other words, he was making decisions based on the fact that he thought she was going to win, and he wanted a job. Slimeball!” Trump wrote in one of his tweets.

That admission by Comey has drawn condemnation from others, including former New Jersey governor Chris Christie (R), who worked closely with Comey and has often lavishly praised him.

“It is exactly what they teach you not to do,” Christie said on ABC. “The hubris he shows in that interview is extraordinary to me. Not the guy I worked with or worked for.”

Still, it is unclear why Trump thought reopening the probe into the email server would help Comey get a job with the Clintons. Clinton and her allies resented the move and said it hurt her chances to become president. And when Trump fired Comey, he cited a memo that said Comey’s termination was partly because he was unfair to Clinton.

After an hour of trashing Comey’s character and reputation, Trump posted that he barely knew Comey, his favorite way of distancing himself from a contentious figure.

“I never asked Comey for Personal Loyalty. I hardly even knew this guy. Just another of his many lies. His ‘memos’ are self serving and FAKE!” he said.

The president soon turned his focus to the Cohen raid, an aggressive move by prosecutors in the Southern District of New York, who were referred material by Mueller’s team.

“Attorney Client privilege is now a thing of the past. I have many (too many!) lawyers and they are probably wondering when their offices, and even homes, are going to be raided with everything, including their phones and computers, taken. All lawyers are deflated and concerned!” Trump wrote.

In fact, Trump has struggled to find lawyers to respond to Mueller’s probe, and investigators in New York say they took Cohen’s materials in the Monday raid because his communications with clients could be part of the commission of a crime.

A little after 9 a.m. Sunday, Trump returned his focus to Comey — whom he seemed to know better than he did 20 minutes earlier.

“Slippery James Comey, a man who always ends up badly and out of whack (he is not smart!), will go down as the WORST FBI Director in history, by far!” Trump wrote.

Preet S. Bharara, former U.S. attorney for the Southern District of New York, appeared on CNN and defended Comey, even as he acknowledged the sharp partisan divides over the former FBI director.

“Clearly the Jim Comey experience has gotten under his skin. He doesn't like someone getting airtime who is critical of him,” Bharara said, referring to Trump. “And the way he deals with it is he lashes out on Twitter.”