An actor who appeared in the film "The 40-Year-Old Virgin" was convicted Thursday of the attempted premeditated murder of his ex-girlfriend in a knife attack.

San Diego County jurors also found Shelley Malil guilty of assault with a deadly weapon for stabbing Kendra Beebe more than 20 times during a quarrel at her San Marcos home in 2008. He was acquitted of residential burglary.

Beebe, 37, sobbed and hugged her best childhood friend, who stood beside her at Vista Superior Court when the verdict was read.

"I feel a sense of relief, but I have to be honest there is never a win in a situation like this," Beebe said. "I was afraid because he was an actor that the people might believe his bad theatrics. I am pleased to see the justice system did its job properly."

She said her body is covered in scars but she has been able to return to her favorite sport, surfing.

Malil — who played Haziz, a co-worker of Steve Carell's character in "The 40-Year-Old Virgin — faces 16 years to life in prison. He faced 21 years before being acquitted of residential burglary for entering the woman's home.

Defense attorney Matthew Roberts told jurors in his closing arguments there was no doubt Malil went too far when he picked up the kitchen knife after finding Beebe on her patio with another man, but that Malil never intended to kill Beebe.

He said the two had a tumultuous relationship and described her as a violent drama queen who manipulated men and tried to make them jealous.

Deputy District Attorney Keith Watanabe countered that Malil, 45, brought the knife to the home and did not grab it in the heat of the moment. He showed jurors photographs of deep wounds on the victim's face, neck and torso and told them they did not have to determine a motive.

Watanabe said Beebe was lucky to be alive and accused the defense of trying to taint the image of Beebe so the jury would acquit the actor.

"We had a smart, intelligent jury, and they reached the right verdict," Watanabe told The Associated Press after the verdict. "There was a mountain of evidence that he was guilty. He certainly won't be winning an Oscar for his performance in the courtroom. The jury did not believe his story."

The defense attorney left the courtroom without comment. Police escorted Malil to the San Diego County jail, where he will remain held without bond until his Nov. 18 sentencing.

The judge excused one juror after she sent him a note stating that she could not be impartial. The note read: "I believe in karma and believe that the victim deserved this because of her immoral lifestyle."

After the alternate was seated and the deliberations started over Thursday afternoon, the jury reached the verdict in 3½ hours.

(This version corrects that judge did not read verdict.)