President Trump and his allies are moving to undermine the credibility of former national security adviser John Bolton, while also preparing to fight his ability to testify during the Senate impeachment trial, according to White House aides and outside advisers familiar with the strategy.

As the president’s lawyers were defending his actions toward Ukraine on the Senate floor on Monday, Trump aides and allies were privately girding for the growing possibility that multiple witnesses will be allowed to appear. They scrambled to determine which testimony they could block and which witnesses they should potentially call, the aides said.

The shift in the White House’s impeachment strategy comes after news emerged Sunday evening that a book by Bolton alleges that the president directly tied the holdup of nearly $400 million in military aid for Ukraine to investigations into former vice president Joe Biden — a potential 2020 rival — and his son Hunter Biden.

Among White House aides and Capitol Hill Republicans, there was a growing brew of anxiety, unease and frustration, as well as the sense that the allegations contained in Bolton’s book, which is due in March, could push the Senate impeachment trial into next week, yielding more damaging disclosures for Trump as he heads into this year’s reelection contest.

Though the White House continued to push aggressively Monday against witness testimony — especially from Bolton — some aides are now convinced that they will lose that battle.

White House counsel Pat Cipollone has privately insisted to senators and allies that the White House did not know Bolton was going to make such an accusation in the book. The manuscript was submitted to the National Security Council in late December as part of a routine pre-publication review process.

Top NSC lawyer John Eisenberg knew that the NSC had a copy of the book but had not reviewed it, a person close to him said.

Cipollone and other White House lawyers had neither expected nor planned for Bolton’s book to emerge during the impeachment trial, and engaged in discussions Sunday night and Monday morning about whether they should adjust their trial strategy.

Trump’s longtime personal attorney Jay Sekulow seemed to allude to the allegations in Bolton’s upcoming memoir about his time in the White House, “The Room Where It Happened,” when the Senate trial resumed Monday, but only briefly and obliquely.

“We deal with transcript evidence, we deal with publicly available information,” Sekulow said on the Senate floor as he pressed the president’s case. “We do not deal with speculation, allegations that are not based on evidentiary standards at all.”

Trump also sought to undermine Bolton, as well as distance himself from his former senior adviser, in tweets that allies pointed to as they tried to tamp down public speculation that Bolton’s book could be damaging to the president.

“I NEVER told John Bolton that the aid to Ukraine was tied to investigations into Democrats, including the Bidens,” Trump wrote. “In fact, he never complained about this at the time of his very public termination. If John Bolton said this, it was only to sell a book.”

The president’s allies tried to portray Bolton as a disgruntled former employee or as someone greedily trying to profit off his time in the White House.

The Republican National Committee blasted out talking points attacking Bolton — who has served in Republican administrations dating back to Ronald Reagan — in an email titled “That’s one way to boost book sales.”

“How convenient that this leaked info happened to be released at the same time preorders were made available for the book on Amazon,” read the Republican committee email. “What a joke.”

Rudolph W. Giuliani, the president’s personal lawyer, in a text message to The Washington Post said he regretted pushing Bolton for the position of national security adviser and said the president was always skeptical of Bolton. He said that Bolton “never once raised any objection to what I was doing in defending” the president, and accused him of acting cowardly.

“I never thought of him as not having the courage to deal with people man to man,” Giuliani said. “So I put him in the category of John the Backstabber.”

Aides and allies said they took solace in their belief that Trump will be acquitted regardless of whether Bolton or other witnesses appear. One senior Republican official likened the allegations in Bolton’s manuscript to the nausea that can accompany a rough boat ride — unpleasant but not fatal.

“It’s like choppy waters, but the boat is not going to sink,” the official said, speaking on the condition of anonymity to share an assessment of the Bolton announcement. “They might throw up because of seasickness, but they’re not going to die.”

But behind the scenes, the White House worked feverishly to quell a possible rebellion in the Senate, with both senior adviser Tony Sayegh, who was brought back into the administration to help with impeachment messaging, and White House director of legislative affairs Eric Ueland reaching out to Republican lawmakers and their aides.

House Democrats charge that Trump withheld military aid and a White House meeting to pressure Ukrainian President Volodymyr Zelensky to investigate the Bidens and a since-discredited theory that Ukraine interfered in the 2016 presidential election. Hunter Biden served on the board of Burisma, a Ukrainian energy company, while his father was vice president.

Officially, the administration continued to push its previous message that Trump did nothing wrong in his July 25 phone call with Zelensky — a call at the heart of the whistleblower complaint that ultimately launched the impeachment inquiry — and the disclosures in Bolton’s book do not change those basic facts.

Sayegh traveled Monday morning to Capitol Hill to address a meeting of Republican Senate communications aides, where he reiterated that pitch.

Some Republican senators, however, remained frustrated, privately pushing the White House to find out just when the president’s legal team learned of the allegations in Bolton’s manuscript — and whether there are other bombshells that might emerge.

In an indication of how much Senate Republicans were caught off guard by the news about Bolton’s book, which was first reported by the New York Times, Senate Majority Leader Mitch McConnell (Ky.) said he had no knowledge of its contents. “The Leader did not have any advance notice,” his spokesman said in a statement.

At the end of last week, Republican leaders were confident they could beat back any attempts to call witnesses and vote to acquit Trump by Friday, but they are now facing a less certain path to ending the trial.

Sen. Patrick J. Toomey (R-Pa.), an influential conservative, on Monday expressed openness to calling witnesses, proposing a “one-for-one” deal, in which both Democrats and Republicans would be allowed to call one witness each.

Republicans have said that if Democrats secure the votes to call Bolton or other administration officials, they will seek the testimony of one or both of the Bidens.

Meanwhile, just about everyone implicated by Bolton’s book sought to distance themselves from him. In a statement, the attorney for acting White House chief of staff Mick Mulvaney, Bob Driscoll, dismissed the charges in the book concerning his knowledge about alleged actions taken toward Ukraine as having “more to do with publicity than the truth.”

“John Bolton never informed Mick Mulvaney of any concerns surrounding Bolton’s purported August conversation with the president,” Driscoll wrote. “Nor did Mr. Mulvaney ever have a conversation with the president or anyone else indicating that Ukrainian military aid was withheld in exchange for a Ukrainian investigation of Burisma, the Bidens, or the 2016 election.”

Attorney General William P. Barr also has consistently worked to inoculate himself from the Ukraine scandal — even as his Justice Department has gone to court to advance the administration’s efforts to withhold documents and testimony from Congress as part of the impeachment process. When news broke Sunday night that Bolton claimed to have told Barr, after Trump’s July phone call with Zelensky, that the attorney general’s name had been invoked, a Barr spokeswoman was quick to dispute Bolton’s account.

The spokeswoman, Kerri Kupec, said Bolton did not bring up the July phone call during a conversation with Barr. Two Justice Department officials familiar with Bolton and Barr’s conversation, speaking on the condition of anonymity because of the matter’s political sensitivity, conceded that Bolton had called Barr in late July or early August but claimed the two talked only about Giuliani’s Ukraine-related efforts.

One of the officials said the call was brief. Bolton, the official said, told Barr that Giuliani was “doing this foreign policy-type stuff,” and warned Barr, “you need to steer clear of that.” The official did not recall Bolton ever bringing up the July phone call between Trump and Zelensky, and said when Barr was informed of that call weeks later, he reacted as if he was learning for the first time.

The revelation in Bolton’s book caught at least some top level Justice Department officials by surprise. Their immediate concern, though, seemed not to be the revelation that Bolton had connected Trump to withholding military aid to pressure Ukraine’s leader to launch political investigations, but that Bolton was undercutting a previous assertion of the attorney general. Officials clamored Sunday night and Monday to make sure that Barr’s side of the story was out, attempting to keep a separation between him and the scandal.

And even Bolton seemed to want some distance — at least from how the news from his book came into public view.

Bolton’s lawyer, Charles Cooper, denied that he or his client had anything to do with the leak of the manuscript to the Times.

“I can tell you unequivocally that we had nothing to do with the leak of any information concerning John’s manuscript,” Cooper said in an interview.

Tom Hamburger contributed to this report.