For months, as the nation was convulsed by the impeachment of President Trump, his critics held out hope that the congressional proceedings would unearth a high-level witness with first-person testimony about Trump’s efforts to use his office to try to pressure Ukraine to launch investigations that could bolster him politically.

Now, more than four months after Trump was acquitted by a Republican-led Senate, his former national security adviser John Bolton has emerged with just such an account in his new book, “The Room Where It Happened: A White House Memoir.”

In it, Bolton asserts that the delay in releasing $400 million in security assistance for Ukraine last summer was indeed an attempt by the president to get the foreign country to provide damaging material about former secretary of state Hillary Clinton and former vice president Joe Biden.

The former national security adviser cites personal conversations in which he describes a quid pro quo that Trump long denied, including an August meeting in which Bolton alleges that Trump made the bargain explicit.

“He said he wasn’t in favor of sending them anything until all Russia-investigation material related to Clinton and Biden had been turned over,” Bolton writes.

The Washington Post obtained a copy of Bolton’s 592-page memoir, which is set to be released publicly Tuesday.

The administration has said the memoir contains classified material, which Bolton’s attorney disputes. On Wednesday night, the Justice Department asked a federal judge to issue an emergency order to block the book’s publication.

In a series of tweets Thursday, Trump called Bolton “disgruntled” and said his book is a “compilation of lies and made up stories, all intended to make me look bad.”

During the impeachment process, lower-level officials testified that they believed Trump had sought to condition the security dollars on Ukrainian willingness to provide politically useful information about the president’s opponents. In a July 25 phone call, Trump asked the country’s newly elected president, Volodymyr Zelensky, to open investigations into Biden and the 2016 election.

But Trump and Zelensky did not discuss the financial assistance on the call, and the White House has denied that the president connected the two issues. Many Senate Republicans argued that House impeachment managers failed to prove the case because numerous witnesses acknowledged they had not personally heard Trump say the two were linked.

Bolton’s remarkable after-the-fact account bolstering the core of the impeachment case will probably be cold comfort to Democrats who listened to Trump’s defense team and Hill Republicans repeatedly dismiss hours of testimony, arguing that few of the witnesses who agreed to participate had spoken directly to Trump about Ukraine.

They have accused Bolton of withholding an account crucial to the public’s interest and instead saving it for a moneymaking memoir.

“Bolton’s staff were asked to testify before the House to Trump’s abuses, and did. They had a lot to lose and showed real courage,” House Intelligence Committee Chairman Adam B. Schiff (D-Calif.), who led the impeachment inquiry, tweeted Wednesday. “When Bolton was asked, he refused, and said he’d sue if subpoenaed. Instead, he saved it for a book. Bolton may be an author, but he’s no patriot.”

For his part, Bolton is silent on whether he believes Trump’s actions toward Ukraine merited impeachment — and pointedly critical of how Democrats handled an impeachment process that he refused to assist.

But he writes that he found Trump’s actions “deeply disturbing” and potentially illegal.

Bolton portrays a president entirely captive to “conspiracy fantasies” about Ukraine spun by his personal attorney Rudolph W. Giuliani, and whose approach toward a U.S. ally, according to Bolton, was entirely motivated by his own political fortunes instead of the national interest.

“I thought the whole affair was bad policy, questionable legally and unacceptable as presidential behavior,” Bolton writes.

In an interview, Giuliani said that he had recommended Bolton for his White House post and spoken to him repeatedly while he was in office, but that Bolton never told him directly that he was concerned about his activities.

“I don’t think anyone will ever trust him ever again,” Giuliani said.

In the book, Bolton defends his approach to the impeachment proceedings, claiming that Democrats oversaw a rushed, unnecessarily partisan process guided largely by the calendar of the party’s presidential primaries. He blames them for narrowing the focus of the proceedings when what he called “Ukraine-like transgressions” existed across Trump’s foreign policymaking, he said.

Out of respect for the powers of the executive branch, Bolton said he would not testify without a court requiring him to do so, given that Trump and White House lawyers had ordered him not to appear. He blasts House Democrats in the book for not issuing him a subpoena to testify or fully seeking to enforce a subpoena issued to his deputy that he says might have provided legal guidance for top Trump aides.

As for the Senate, where Republicans chose to call no witnesses at all, he concludes that his account “would have made no significant difference” in Trump’s acquittal — blaming Democrats’ “impeachment malpractice” for poisoning the process, rather than the Republicans who never asked for his testimony.

He writes that he wanted to tell his story in his own way and was determined to bide his time to do it.

“I believed, as the line in Hamilton goes, that ‘I am not throwing away my shot,’ especially not to please the howling press, the howling advocates of impeachment or Trump’s howling defenders,” he writes.

Still, while Bolton refused to defy the White House and testify without a court order, he proceeded with publication of his book over Trump’s vehement opposition.

The president threatened earlier this week that Bolton would have “criminal problems” if he released his memoir, saying it contains classified material. Bolton’s attorney has denied that.

The basics of Bolton’s account about Ukraine have been known since January, when the New York Times published key details, citing people who had reviewed the book manuscript.

But the book itself provides dramatic new details and quotes, suggesting that nearly all of Trump’s top aides knew why the president was withholding the military dollars.

Bolton writes that Trump had always been hostile to Ukraine, perceiving it as a roadblock to his desire for better relations with Moscow and a troublesome irritant best handled by Europe instead of the United States.

He describes Trump as growing increasingly incensed by Ukraine in spring 2019, spun up by Giuliani to believe that the foreign country was working with Democrats against him.

Bolton writes that on May 8, 2019, he was summoned to the Oval Office, where Trump was meeting with Giuliani, then-acting chief of staff Mick Mulvaney and White House counsel Pat Cipollone. The group was discussing Giuliani’s desire to meet with Zelensky to discuss Ukrainian investigations into Clinton and the 2016 election, as well as Biden and his son Hunter, who sat on the board of a Ukrainian gas company.

“Even after they became public, I could barely separate the strands of the multiple conspiracy theories at work,” Bolton writes. He says Trump came to conclude — without evidence — that Ukraine, rather than Russia, had been behind cyberhacks of Democratic officials in 2016.

During the May meeting, Bolton writes, Trump ordered him to call Zelensky and ask him to meet with Giuliani — a startling intermingling of Trump’s personal agenda with the work of government officials.

Bolton ignored the instruction, he wrote, and Giuliani ultimately canceled his planned trip to Kyiv after it was reported by the Times.

Trump and Giuliani have both denied the meeting took place, or that Trump asked Bolton to call the Ukrainian president on Giuliani’s behalf.

Bolton describes Trump’s beliefs about Ukraine as widely known by senior staff, particularly following an Oval Office meeting that Trump held with Energy Secretary Rick Perry, Ukraine envoy Kurt Volker, Ambassador to the European Union Gordon Sondland and Sen. Ron Johnson (R-Wis.) after the group attended Zelensky’s May 2019 inauguration.

Bolton did not attend the meeting but said that his deputy, Charles Kupperman, reported that Trump railed against Ukraine, at one point telling the group, “Ukraine tried to take me down. I’m not f------ interested in helping them” and “I want the f------ DNC server,” using an expletive to refer to a conspiracy theory about a Democratic Party server hacked by Russia that he claimed could be found in Ukraine.

By the time Trump and Zelensky spoke on July 25, a phone call that prompted a whistleblower complaint and ultimately the president’s impeachment, Bolton writes that it was clear to him that “the linkage of the military assistance to Giuliani’s fantasies was already baked in.”

Bolton writes that on at least eight occasions, he, Secretary of State Mike Pompeo and Defense Secretary Mark T. Esper pressed Trump to release the money, speaking to him either individually or together.

The Pentagon, asked about Bolton’s characterization on Wednesday afternoon, declined to comment. The State Department did not immediately respond to a request for comment.

Trump made the reasons for his opposition explicit during an Aug. 20 meeting with Bolton, according to the book, when the president said he would not release the aid to Ukraine until he got information about his political enemies.

Bolton writes that he suspected some of Giuliani’s activities, including his effort to oust the well-respected U.S. ambassador to Ukraine, Marie Yovanovitch, might have been driven by the interests of Giuliani’s other clients, who were, unlike Trump, paying the former New York mayor.

At one point, Bolton describes meeting with Mulvaney, Cipollone and other White House lawyers, to discuss whether Giuliani had “ethical problems,” given attorney rules that bar the use of one client relationship to advance the interests of other clients.

Bolton writes that the others determined that Giuliani’s actions were “slimy” but probably not a violation of the rules.

“So much for legal ethics,” he writes.

On Wednesday, Giuliani said that Bolton could easily have come to him with his concerns. “Not a word, not a peep,” he said. “If he’s telling the truth, and he really believes this, I think he’s a complete backstabber.”

Bolton also alerted both Pompeo and Attorney General William P. Barr to his concerns, saying he called Barr on Aug. 1, a week after Trump told Zelensky by phone that he should work with Barr and Giuliani on investigations of Biden.

Bolton writes that he briefed Barr on the conversation, including Trump’s references to the attorney general. “I suggested he have someone rein Giuliani in before he got completely out of control,” Bolton writes.

Barr has denied learning of the call from Bolton, saying he learned of it only in mid-August.

Bolton writes that Pompeo, too, was concerned about Giuliani’s actions in Ukraine, telling Bolton at one point that there were “no facts to support” Giuliani’s allegations that Yovanovitch was working against Trump’s interests. Still, pressed by Trump, Pompeo abruptly ordered Yovanovitch, a 30-year career diplomat, to leave her post in April 2019.

Bolton insists that his own behind-the-scenes efforts to get Ukraine its financial assistance while working to curb Giuliani’s influence was the most effective way to address Trump’s improper behavior, rather than confronting the president more directly or resigning in protest over the episode.

In his book, Bolton also confirms two of the most memorable revelations of the impeachment proceedings.

He did tell adviser Fiona Hill that he did not want to be part of any “drug deal” being cooked up by Mulvaney and Sondland regarding Ukraine, he writes.

And he said he warned colleagues that Giuliani was a “hand grenade” likely to blow up the White House, adding that the remark “still sounds right today.”

On Wednesday, Giuliani responded: “If I’m a hand grenade, then he’s an atomic bomb.”

John Hudson and Dan Lamothe contributed to this report.