Shelley Mallil Shelley Mallil

Shelley Malil, an actor in The 40-Year-Old Virgin, was convicted of attempted murder in the knife attack of his ex-girlfriend, The Press Association reports.

Malil was also found guilty Thursday in a Vista, Calif., court of assault with a deadly weapon and domestic violence in the stabbing of Kendra Beebe, who was cut more than 20 times in August 2008. Malil testified earlier this month that he didn't know he was stabbing her.

40-Year-Old Virgin actor says he stabbed girlfriend by mistake

"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 from the attack.

The attack took place at Beebe's house after Malil, who played one of Steve Carell's electronics store co-workers in Virgin, said he arrived there and found her drinking wine with another man, David Maldonado. Malil said he thought Maldonado was going to his car to get a weapon to come after him, so he grabbed a knife to defend himself.

Check out other celebrity scrapes with the law

After he was tapped on the head, Malil said he started slashing in self-defense in the dark until he heard Beebe shouting and realized she was the one he was stabbing.Malil, who was acquitted of residential burglary, is scheduled to be sentenced Nov. 18. He faces 16 years to life in prison.