SAN FRANCISCO — The tech consultant charged in Cash App founder Bob Lee’s stabbing death had no motive to kill him and in fact was forced to defend himself against Lee, who had become aggressive while on a multiday drug bender, lawyers for Nima Momeni said in opening statements Monday.

Prosecutors say Momeni, 40, planned the April 4, 2023, attack after a dispute over his younger sister, Khazar, with whom Lee was friends. They say Momeni took a knife from a unique set in his sister’s condo, drove Lee to a secluded area and stabbed him three times, then fled.

“Stabbed through his heart and left to die,” said Omid Talai, assistant district attorney, “our victim was stabbed repeatedly, once in his chest, once in his hip and literally one puncturing his heart.”

Lee’s death at age 43 — after staggering on a deserted downtown San Francisco street seeking help — stunned the tech community, and fellow executives and engineers penned tributes to the charismatic entrepreneur’s generosity and brilliance. Lee was chief product officer of cryptocurrency platform MobileCoin when he died. He was a father to two children.

Judge Alexandra Gordon has told jurors the long-awaited trial that began Monday in San Francisco Superior Court is expected to last two months. Momeni, who lives in nearby Emeryville, California, has been in custody since his arrest days after Lee died at a San Francisco hospital.

Momeni has pleaded not guilty. He faces 26 years to life in prison if convicted.

Lawyer Saam Zangeneh told jurors that defense attorneys will show that Momeni bore Lee no ill will and that wound patterns show that Momeni was forced to defend himself after Lee pulled a knife out of his pocket, high on drugs and having slept only six hours over a four-day period of doing cocaine and drinking.

“We feel that once we present this case … and once we fill in the gaps, the only viable verdict in this case is a verdict of not guilty,” Zangeneh said. “Somebody’s dead. Nobody likes that, but you have the right to defend yourself.”

Momeni, seen at previous court hearings in orange jail clothing, was seated Monday with his lawyers, wearing a dark suit. His mother, who has been a steadfast presence at hearings, was in the courtroom.

On the other side of the courtroom sat members of Lee’s family, including his ex-wife, father and brother. Lee’s brother put an arm around his father when the 911 call Lee made was replayed in court.

In it, Lee is heard repeatedly asking for help, unable to answer the dispatcher’s questions about where he was and what his name was. He said he had been stabbed.

Talai, the assistant district attorney, said jurors will hear from a friend of Lee’s, who was with him and Momeni’s sister the day before Lee was stabbed.

The friend will testify that Momeni angrily grilled Lee on the phone that night over his sister, drugs and “girls getting naked,” acting like “an overprotective, wannabe tough guy” while Lee was being mellow and happy, Talai said.

Zangeneh said he will show that the friend is not a reliable witness and that Momeni and Lee had traded friendly texts that night. Lee likely invited Momeni to join him at a strip club, Zangeneh said.

Surveillance video of Lee’s final night shows him entering the posh Millennium Tower downtown, where Momeni’s sister lives with her husband, a prominent San Francisco plastic surgeon.

Video shows Lee and Momeni leaving the building after 2 a.m. and driving off together in Momeni’s car.

Other video will show the two men getting out of the car in a isolated spot by the Bay Bridge, and then Momeni stabbing Lee three times, tossing the knife from his sister’s kitchen set and quickly driving away, Talai said.

Talai said the prosecution will share text messages in which Momeni, the following morning, tells his sister he did not know what happened to Lee that night but that he was preparing a rape case against him, thinking Lee had assaulted Khazar.

The attorney said video recorded by a San Francisco police detective trailing Momeni before his arrest shows him reenacting the three stabbing motions outside his previous lawyer’s office, but no reenactment of a struggle over the knife that Momeni’s attorneys say Lee wielded first.

Police recovered a knife with a 4-inch (10-centimeter) blade in the secluded area where Lee was stabbed. Prosecutors said tests showed Momeni’s DNA on the weapon’s handle and Lee’s DNA on the bloody blade.

Zangeneh said Monday that police should have tested the handle for fingerprints, namely Lee’s. He scoffed at the idea of Momeni bringing what was essentially a “paring” knife from his sister’s kitchen to kill Lee, and said that Momeni did not realize Lee was hurt, much less fatally wounded.

He said his client is eager to tell his side of the story, but they haven’t decided whether Momeni will testify in his defense.

Family members for Momeni and Lee declined to comment Monday.