Shelley Malil, the actor best known for playing an electronics store clerk in 'The 40-Year-Old Virgin,' was found guilty Thursday of attempted premeditated murder of his ex-girlfriend, Kendra Beebe, the Associated Press reports. The actor faces up 21 years to life in prison for the knife attack.

Malil was also found guilty of assault with a deadly weapon. He was acquitted of residential burglary. The actor pleaded not guilty to all the charges, claiming he thought Beebe was somebody else getting ready to attack him.

Beebe was stabbed at her San Diego County home in August 2008 after Malil found her socializing with another man, David Maldonado. Malil reported he felt threatened and believed Maldonado was going to kill him. He recalls getting "hit from the back on the side of the head. It felt like cold granite countertop."