Donald Trump was minutes away from being grilled under oath by the New York attorney general and he was itching to talk. To fend off the state’s fraud investigation, the former president insisted on answering every question, believing he alone knew what to say.

But his lawyer at the time, Ronald P. Fischetti, directed Trump to keep quiet.

He instructed the former president to invoke his Fifth Amendment right against self-incrimination during the 2022 deposition with the attorney general, Letitia James, according to two people with knowledge of the discussion. Fischetti warned Trump that he was risking perjury charges, and that he would come to regret it.

Trump relented, but his legal problems were only just beginning. Over the past year, he was indicted four times and faced three civil trials. And as the former president’s first criminal trial approaches on March 25, it has become clear — as it was to Fischetti — that the single person who poses the greatest danger to Donald Trump may just be Donald Trump.

In two of the recent civil trials, the former president directed his lawyers to object at inopportune moments, ranted about the judges and even stormed out of the courtroom. He lost both trials and was ordered to pay more than half a billion dollars combined.

Now, a new team of lawyers is preparing to defend him in Manhattan, where prosecutors have accused Trump of covering up a potential sex scandal that could have swayed the outcome of the 2016 election. It is not only Trump’s first criminal trial, but the first time any former American president has faced prosecution. And how the legal team corrals Trump — or fails to — could determine whether he is also the first former president to be convicted.

“I would expect Trump to try to act up,” said Ty Cobb, a veteran lawyer who worked in the White House Counsel’s Office during the Trump administration and who has since been critical of the former president. He added: “He needs to be aggressively muzzled by the lawyers if he is to avoid offending the jury.”

This article is based on interviews with 14 people who have either represented Trump and his family or witnessed up close his outsize influence on his own legal strategy. The people, some of whom requested anonymity to speak freely about Trump, noted his extensive experience with civil cases, both defending and bringing them.

But there is a difference between civil and criminal trials, and between setting a broad strategy and grasping the nuances of argument and diplomacy that make for a successful defense.

Trump faces steep odds in his first criminal case, which was brought by the Manhattan district attorney, Alvin Bragg. Trump’s belligerent courtroom antics might not resonate with a jury in Manhattan, where only about 12% of voters supported him in the 2020 election. And Bragg’s evidence is extensive, featuring documents, tape recordings and testimony from Trump’s onetime confidants.

To avoid conviction, his defense team, led by Todd Blanche and Susan R. Necheles, will have to be stellar. They will most likely argue that the evidence does not directly implicate Trump, and that the witnesses are liars.

Like Fischetti, who recently died, Blanche and Necheles are experienced criminal lawyers. But they will have to strike a tricky balance: appeasing their powerful and impulsive client without losing the jury or angering the judge, Juan M. Merchan.

Typically, defendants play a role in preparing their cases, and sometimes an important one. Seldom, though, do they formulate, let alone dictate, trial strategy or make spontaneous tactical decisions from the defense table.

In two of his recent losing civil cases Trump did exactly that. The major questions in the cases were essentially decided by the time Trump arrived, but the trials were held to determine what penalties he’d face.

In the first of the trials, James accused Trump of fraudulently inflating his net worth. The former president made regular visits to the courtroom and his influence on the proceedings was apparent as he wrote notes to his lawyers and whispered in their ears.

When Trump was present, his lawyers seemed more likely to grandstand, as if they were fulfilling his expectations of a performance. During closing arguments, another Trump attorney, Alina Habba, echoed her client’s dire warnings, saying at one point that if James were to win, “New York is screwed.”