After seven days of testimony from law enforcement, crime-scene technicians, expert doctors and the sister of Jarrod Ramos, defense attorneys for the 41-year-old who murdered five Capital Gazette employees rested their case Thursday — making way for prosecutors to launch opening statements in the trial to determine if Ramos should be held criminally responsible for the 2018 mass shooting.

The defense’s argument centered on three experts witnesses who, after interviewing Ramos since the attack, said he had a variety of mental conditions, including autism spectrum disorder, delusion disorder and obsessive-compulsive disorder. Defense attorneys argued that those disorders proved that Ramos, at the time of the June 2018 mass shooting, lacked the ability to appreciate the criminality of his behavior or conform it to the requirements of the law — the legal test for criminal responsibility in Maryland.

But during her opening to the jury Thursday afternoon, Anne Arundel County State’s Attorney Anne Colt Leitess offered a different narrative, depicting Ramos as a narcissist who wanted to get back at the Capital Gazette newspaper.

“This is not about mental health,” Leitess said, “it’s about revenge.”

The state’s attorney said her office will present testimony from its own medical expert as well as an independent, ­court-appointed doctor, who will argue that Ramos has a personality disorder but not a psychotic disorder. Leitess said the jury will also hear from six of the shooting survivors about the terror inside the newsroom that day.

The jury had spent the first half of Thursday listening to the testimony of the defense’s third and final medical expert, psychiatrist Dorothy Lewis.

Lewis, who interviewed Ramos for a total of 17 hours, told the jury that the defendant “has a combination of mental problems that together seem to cause this kind of violence.” The doctor also testified that, in her expert opinion, Ramos met both prongs of the test for criminal responsibility. He knew what he did was illegal, she said, but he did not and does not appreciate the “wrongfulness” of what he did or the magnitude of pain he created.

But on cross-examination, Leitess pointed out that “wrongfulness” is not the legal standard in Maryland. And when she asked Lewis to describe whether Ramos’s behavior leading up to the shooting — including his obeying traffic rules and refraining from shooting others outside the newsroom — was evidence that he was able to conform his behavior to the law, she said she could not say.

Lewis’s testimony, taken with the analysis of clinical psychologist Catherine Yeager and neurologist Thomas Hyde, the other defense medical experts, painted a picture of a delusional Ramos.

The delusions, they said, took hold when columnist Eric Hartley’s article about Ramos’s conviction in a harassment case was published in the Capital Gazette and evolved over time to include the entire newspaper and the Maryland judicial system.

By the time he stormed the newsroom, they argued, Ramos was convinced that everyone was corrupt and that the rule of law was broken.

The experts also described ­early-childhood tendencies of meticulousness, “rigid” thinking and self-isolation as signs of autism; and they pointed to excessive concern for dirt and germs, symmetry, and a fixation on “ideas of right and wrong” as symptoms of obsessive-compulsive disorder.

The prosecution repeatedly highlighted inconsistencies in expert testimony and called into question the validity of their medical conclusions, in part because they based their opinions almost exclusively on interviews with Ramos and his sister.

Citing jail records, housing documents and interviews Ramos gave to an independent court-appointed doctor, prosecutors questioned Ramos’s alleged obsession with cleanliness, which defense attorneys highlighted throughout their case as evidence of a mental disorder. Prosecutors pointed to a specific instance where, while in jail, Ramos used his own feces to retaliate against other inmates or move to another cell.

Prosecutors also called attention to the different ways Ramos described his friendships depending on which expert interviewed him. Finally, they zeroed in on Ramos’s fixation with ideas of right and wrong, questioning whether he understood the crime he committed in the local newsroom.

“He knew that killing people at the Capital Gazette was a crime, didn’t he?” asked Leitess on Wednesday.

“He knew it was a crime,” Yeager said.

Ramos has already pleaded guilty to 23 counts in the mass shooting. If he is found not criminally responsible, he could be sent to a state hospital where he could eventually be eligible for release instead of sentenced to prison.

Yeagar, who testified Tuesday and Wednesday, drew from 15 hours of interviews with Ramos over the course of three days in September 2019 and October 2020, in addition to other records and conversations with his sister and a childhood friend. She concluded that Ramos suffered from autism spectrum disorder, obsessive-compulsive disorder and delusional disorder — which Lewis also identified.

But Yeagar stopped short of classifying her impressions as “diagnoses” because she was not able to interview Ramos’s parents or other sources from his early childhood.

She described a young Ramos as a rigid, “black-and-white thinker” who meticulously lined up his Ninja Turtle figurines and dressed in the same maroon stripes.

Yeagar said Ramos told her that he felt as if he was consistently infringing upon others in face-to-face encounters. He said he felt relief when he was alone.

On cross-examination, Leitess asked Yeager to defend her testimony against insights from jail records and interviews Ramos gave to another psychiatrist, state expert Sameer Patel, who is expected to testify in the coming days.

Ramos told Patel, for example, that he had close to a dozen friends. He told Yeager that he had one friend.

Private investigator Thomas Lancaster also testified this week, reading aloud from court filings related to the 2011 harassment case against Ramos, including lawsuits, letters and appeals the man penned about his reputation and belief that Hartley and the Capital Gazette had wronged him.

In one letter to the editor of the newspaper, Ramos wrote: “You’ve crippled my life for a year, and now I’m going to cripple your company forever.”

In another court filing, Ramos included an excerpt from the Epic of Gilgamesh: “I will go before thee / Though thy mouth calls to me; / ‘Thou art afraid to approach / If I fail, I will establish my name.”

During her testimony, Yeager said the legal documents supported her diagnostic impressions.

But when the lens turned to Leitess on Thursday afternoon, the prosecutor said Ramos’s behavior may have been “eccentric” and “odd,” but it was not “insane.”

“He does suffer from mental health disorders, there’s no doubt about it,” Leitess told the jury. “But they are personality disorders.”

Personality disorders, she said, are not psychotic disorders, and Leitess said the jury will hear from two expert witnesses who will speak directly to Ramos’s alleged criminal responsibility in the attack.

The state will argue, Leitess said, that Ramos was a vengeful narcissist who believed he was smarter than everyone else. She said she will show the jury that when Ramos lost his court cases related to the harassment plea and defamation suit against the Capital Gazette, he found new ways to get back at the institutions he believed harmed him.

The newsroom, she told the jury, was a “soft target” — and Leitess said that Ramos thought killing the people inside would prompt their family members to ultimately sue the Capital Gazette for failing to protect its employees. In that scenario, Leitess said, the newspaper would finally have to pay.

The state’s attorney ended her opening statement by reminding jurors that Ramos is presumed sane and that the defense must prove that he wasn’t. Then she hinted at the highly strategic games Ramos chose to play in his free time.

“This is not a game. This is not poker. This is not chess,” she said. “This is their burden of proof.”