After opening arguments in the Brian Walshe trial, it appeared a near certainty that Walshe would take the stand in his own defense.

But Walshe’s defense rested its case Thursday morning without putting the defendant — or any other witnesses — on the stand.

In any criminal case, a defendant has the absolute right to testify and jurors can’t hold their decision not to take the stand against them, Christopher Dearborn, a Suffolk Law professor, noted.

“That being said, sometimes it’s hard for jurors to swallow a theory of defense without hearing from a defendant or defense witness‚” Dearborn told MassLive in a telephone interview Thursday evening. “I think you have to trust the lawyers’ assessment of what’s best.”

Still, Mark Bederow, a criminal defense attorney in New York City, said he was surprised by the decision not to call Walshe to testify.

It’s rare for a criminal defendant to take the stand, but Bederow said he believed the circumstances of the Walshe case made him a candidate to testify.

Walshe, 50, is accused of killing his wife, Ana, in their home on the early morning of New Year’s Day 2023, then dismembering her body and disposing of her remains at dumpsters across the state.

Walshe’s defense has said Ana Walshe died a sudden, unexplained death of natural causes and that he panicked after finding her dead.

Every indication leading up to Thursday morning was that Walshe was going to testify. Judge Diane Freniere indicated as much when, out of the presence of the jury, she noted that his defense raised a number of potential issues relating to his presumed testimony.

“What the defense has done is they’ve pulled the rug out from the jury at the 11th hour,” Bederow said Thursday. “When you have a murder case and a missing body murder case, and the defense is telling you what happened and how he reacted and what he did, they are telling you he’s testifying.”

Still, he said, Walshe’s lawyers probably knew he would be opening himself up to a blistering cross-examination if he did actually testify.

“Presumably, they convinced him it would not be a good idea,” Bederow said.

A criminal defense lawyer himself, Dearborn said he recalled several cases where he had prepared defendants to testify but ultimately decided not to call them.

“Sometimes having a defendant testify, even when they’re telling the truth, can just muddy the waters,” he said. “It’s really, I think, inappropriate and unfair … to second-guess tactical and strategic decisions by defense lawyers.”

In many cases he tried, Dearborn said, he opted, like Walshe’s lawyers did, not to put on any defense whatsoever. In any case, prosecutors have the burden of proof, and not presenting a defense can be a way to amp up the pressure on the government, he explained.

Mounting a defense case can have the downside of jurors starting to weigh that evidence against the government’s, even though they are instructed about the burden of proof, Dearborn said.

Even though they didn’t put on any evidence, Walshe’s lawyers did present their own theory to the jury.

“There’s nothing of value he [Walshe] could’ve added to that theory by testifying,” he said, adding that if the defense theory had instead been self-defense or some other affirmative defense, Walshe may have been a stronger candidate to testify.

Still, Dearborn acknowledged that prosecutors appeared to have a strong circumstantial case against Walshe.

To Bederow, the defense was always fighting an uphill battle, particularly when, before the start of jury selection, Walshe pleaded guilty to two charges, admitting that he disposed of his wife’s body and lied to police.

“The case they were dealing with was difficult from the start, based on the guilty pleas and the idea, ‘I didn’t kill her, but I … deposited her here, there and everywhere,’” Bederow said.

During closing arguments, prosecutors will have to connect the dots of their circumstantial case for the jury, outlining how they believe all the different pieces of evidence they have introduced prove Walshe committed the premeditated murder of his wife.

The defense, meanwhile, is likely to focus on poking at the commonwealth’s theory to create reasonable doubt in the minds of jurors, Dearborn said.

“The goal is to chip away at that and expose any holes in the government’s case and hope that is enough,” he said.

Closing arguments are scheduled for Friday morning.