As the flashlight struck Tina Towler’s face and the knife pierced her back six times, her daughter Jasmine Gilbert was there.

As Towler’s boyfriend, James Ferguson, was hit in the head with a frying pan and pummeled to death, Jasmine Gilbert was there.

And as police came upon the bodies of Ferguson and Towler heaped on the bedroom floor of their Laurel apartment, Jasmine Gilbert was still there. Gilbert — who is bedridden, unable to speak and fed through a tube — was lying uninjured in a hospital bed in the corner of the room with a sheet covering her face.

That Gilbert, then 26, survived the violence inside the one-bedroom apartment where she lived with Towler and Ferguson on May 2, 2013, was one key piece of evidence jurors considered in the trial of Thurston Lamont ­Yerby, 49.

A Prince George’s County jury on Friday convicted Yerby on two counts of second-degree murder in the brutal slaying of Towler, 45, and Ferguson, 42. The jury deliberated for more than 10 hours before coming to a decision late in the night.

The crime was a product of a love triangle of sorts, prosecutors argued, with Yerby and Ferguson both intimately linked to Towler, and Gilbert an unwitting witness.

Whoever killed the couple knew that Gilbert suffers from cerebral palsy and would not be a threat, argued Jerome Spencer, a prosecutor with the Prince George’s County State’s Attorney’s Office. Yerby, who knew Ferguson and Towler through mutual friends and work, once helped take Gilbert to a Christmas party and understood the woman’s condition.

“He knows Jasmine is harmless,” Spencer said. “He knows she can’t hurt him.”

Yerby was locked in the bedroom sexually assaulting Towler, who was drunk the night she was killed, Spencer told the jury. When Ferguson burst into the room, the altercation began, Spencer argued. The couple were beaten with flashlights, pots and pans, and a heavy vase and left dead. Towler’s daughter was trapped in the aftermath of the chaos, Spencer said.

Towler’s and Ferguson’s bodies were not discovered until about 8 a.m. May 2, when a nurse coming to the apartment to check on Gilbert — whom the family calls “Jazzy” — discovered the grisly scene. It is unclear how long the two were dead, with a nurse being the last person who reported seeing the couple alive the evening of May 1.

“She didn’t deserve to die that day at the foot of her daughter’s bed,” Spencer said. “Jasmine can’t tell us what happened that day, but the evidence has.”

Yerby’s fingerprints and DNA were also found at the scene, according to evidence presented during the five-day trial. And his DNA was found on the knife that police believe was used to stab Ferguson and Towler, witnesses testified.

But Yerby’s attorney, James Guillory, argued that it is unclear exactly what happened inside the bedroom where the couple were found dead. Guillory suggested that because lab results revealed Towler and Ferguson had PCP in their systems, the drug known for its unpredictable psychotic effects could have led to any number of explanations for their slayings.

“It’s a crazy drug in the system of both victims,” Guillory said. “You could come up with a hundred different stories about what happened.”

Guillory also pointed out that none of his client’s fingerprints were lifted from several of the alleged murder weapons and that there was no evidence to show Yerby sexually assaulted Towler.

“Something strange happened in this house,” Guillory told the jury. “But we have no idea why, and we don’t know how.”

Ferguson’s sister Princesella Hayles said her family was pleased with the verdict. She said her brother loved to cook and was a happy, harmless person.

“There is justice in the justice system,” Hayles said.

Yerby’s family declined to comment after the verdict was announced late Friday. But after the jury finished reading its decision, Yerby’s mother began to wail in the courtroom.

“Oh, Lord, have mercy!” she yelled tearfully.

Jay Towler, Tina Towler’s former husband, said he felt good about the verdict but called it a “no-win situation” for the families involved.

Gilbert is now in a group home under state custody, Jay Towler said.

Gilbert, who cries when she is upset and smiles when she listens to music, may have heard what happened to her mother the night she and Ferguson died, Jay Towler said. But the family does not have any plans to tell her about Friday’s verdict.

“She’s okay in her own little world,” Jay Towler said. “Right now, she’s in a happier place.”