As the Manhattan district attorney's office ramps up its yearslong investigation of Donald Trump, a new book by a former prosecutor details just how close the former president came to getting indicted — and laments friction with the new D.A. that put that plan on ice.

Mark Pomerantz, who oversaw the investigation until early last year, writes in “People vs. Donald Trump: An Inside Account” that then-District Attorney Cyrus Vance Jr. authorized him in December 2021 to seek Trump's indictment.

After scouring Trump's life and business, Pomerantz writes that prosecutors agreed on a case involving allegations that Trump falsified records by inflating the value of assets on financial statements he provided lenders.

Vance was leaving office within weeks, but he expressed confidence that his successor, Alvin Bragg, would agree with his assessment, Pomerantz writes. But Bragg and his team had other ideas — expressing trepidation about the strength of evidence and the credibility of a key witness.

They decided not to proceed, at least not with the speed Pomerantz and co-lead prosecutor Carey Dunne wanted. Pomerantz writes. The stagnation compelled both men to leave the office.

“Once again, Donald Trump had managed to dance between the raindrops of accountability," Pomerantz writes in the book, which is set to be published Tuesday by Simon & Schuster.

The Associated Press and other news outlets received copies of the book Friday.

Trump has threatened legal action against Pomerantz and Simon & Schuster for what he contends are “defamatory statements” and “groundless falsehoods” about his alleged criminal conduct.

Trump has repeatedly denied any wrongdoing and said the New York investigations are attempts by Democrats to keep him out of the White House.

In a post to his Trump Social platform, Trump said Pomerantz's book “is turning out to be a hit on the District Attorney and the ‘weak’ case ‘with many fatal flaws.’”

Pomerantz’s 304-page volume weaves his behind-the-scenes account of the spirited battle over whether to charge Trump with anecdotes from his decades-long career as a mafia prosecutor and white-collar litigator. Those experiences contrast with Bragg's work as a former federal prosecutor, law professor and, in the years prior to his election, pursuing civil cases against Trump as a top official in the state attorney general's office.

The book also works to temper the drama surrounding Pomerantz’s split from Bragg, which spilled into the public last year when his resignation letter appeared in The New York Times.

Pomerantz portrays the dispute not as a brawl, but as a legitimate difference of opinion shaped by lengthy Zoom calls and telephone conversations. During the sessions, Pomerantz writes that he and Dunne would detail the pros and cons of pursuing a Trump indictment, while Bragg or members of his team pushed back with questions and concerns.

At first, Pomerantz writes, Bragg seemed overwhelmed by other matters — managing the massive D.A.'s office and dealing with blowback from his approach to prosecuting certain crimes. He writes that Bragg showed up late to an initial meeting where he laid out the case and that Bragg ended up looking at his phone most of the time. The D.A. was more attentive at subsequent sessions, Pomerantz said.

At one point, he writes, Bragg said that he “could not see a world” in which he would indict Trump and call Trump's long-estranged former lawyer and fixer Michael Cohen as a witness.

Cohen, who claims to have intimate knowledge of Trump's financial dealings, was convicted in a parallel federal case of lying to Congress.

Cohen’s lawyer, Lanny Davis, said in a statement Friday: “We were treated respectfully and professionally by Mr. Mark Pomerantz and his team. We appreciated their integrity and hard work. Despite the denied allegations concerning Mr. Cohen’s credibility, I can confirm that Mr. Cohen will continue to cooperate with DA Bragg and his team, speaking truth to power — as he has always done.”

Aside from a few blunt emails he wrote criticizing Bragg's deliberateness, Pomerantz said his rift with the D.A. was civil.

"There was never any yelling or screaming," he writes of their final conversation in February 2022. He defended Bragg against people suggesting he had an ulterior motive not to indict, saying that they "had no clue about how these prosecutorial decisions are made or were bloodthirsty for some action against Trump," Pomerantz writes.

Bragg’s office sought last month to delay the book's publication, saying in a letter to Pomerantz and Simon & Schuster that he was violating a confidentiality agreement he signed upon joining the D.A.'s office and that the book could “materially prejudice" the investigation. Pomerantz said nothing in the book jeopardizes the probe. Simon & Schuster said it will release the book as scheduled.

In a statement Friday, Bragg said he hasn't read the book, and “won’t comment on any ongoing investigation because of the harm it could cause to the case.” He defended his decision to refrain from charging Trump.

“After closely reviewing all the evidence from Mr. Pomerantz’s investigation, I came to the same conclusion as several senior prosecutors involved in the case, and also those I brought on: more work was needed. Put another way, Mr. Pomerantz’s plane wasn’t ready for takeoff," Bragg said. “Our skilled and professional legal team continues to follow the facts of this case wherever they may lead, without fear or favor. Mr. Pomerantz decided to quit a year ago and sign a book deal."

The District Attorneys Association of the State of New York also expressed concerns, writing in a statement Friday that it was “unfortunate and unprecedented” for a former prosecutor to speak out during an ongoing investigation.

Pomerantz joined the D.A.'s office in 2021 as a special assistant district attorney to lead the Trump probe. He writes that early in his involvement they weighed charging Trump and his company under the state's version of the federal racketeering law, given the array of tax, fraud and other potential crimes they were investigating.

Pomerantz likened Trump's cunning, charisma and ability to “stay one step ahead of the law” to that of late Gambino crime family boss John Gotti, whose son, John A. Gotti, he prosecuted while an assistant U.S. attorney.

When he arrived at the D.A.'s office, Pomerantz writes, the investigation was so broad “it seemed unfocused and sprawling.”

In 2021, Pomerantz's team charged Trump’s company, the Trump Organization, and its longtime finance chief, Allen Weisselberg, with evading taxes on fringe benefits given to company executives, but it was Bragg and his team who saw the cases through, securing Weisselberg's guilty plea in August and the Trump Organization's conviction in December. Weisselberg is serving a five-month jail sentence and the company was fined $1.6 million.

Under Bragg's direction, the district attorney's office recently returned to a part of the investigation that had long-ago stalled: payments made to two women on Trump's behalf in 2016 to keep them quiet about alleged affairs.

Pomerantz portrays the hush-money payments — made or arranged by Cohen — as perhaps the most challenging, legally fraught of the potential cases against Trump.

He writes that while a case could be made that Trump falsified business records by logging Cohen’s reimbursement for one of the payoffs as legal fees, he could only be charged with a misdemeanor under New York law — unless prosecutors could prove he falsified records to conceal another crime.

Vance abandoned the hush-money angle in 2019, pivoting the investigation’s focus to other matters, but Pomerantz said he revisited it when he joined the office in January 2021, looking for a way to make more serious felony charges stick. He considered whether Trump could be charged with money laundering and explored if one of the women who got money, Stormy Daniels, had demanded payment to remain quiet, thereby extorting him.

Pomerantz said the hush-money matter became known around the office as the “zombie” case.

Still, Pomerantz wrote, “Over the months that I and others worked on the case, we developed evidence convincing us that Donald Trump had committed serious crimes," Pomerantz writes.

Even if a conviction wasn't a certainty, Pomerantz said he thought they owed it the public to bring the case to trial.

“Losing it would be better than not even trying,” he wrote.