"It was just chaos. It was chaos," said Shelley Malil.
"It wasn't my intention of killing anybody or hurting anybody. It was my intention to get the hell out of there," Malil continued.
45-year-old Malil played an electronics store clerk in the Steve Carell hit comedy The 40-Year-Old Virgin.
Now Malil is on trial, accused of attempting to murder 38-year-old Kendra Beebe.
Malil acted out for the jury how he and a male friend of Beebe's struggled over a knife on the patio of Beebe's home in Vista, California.
Malil explained, "My hope was to grab the knife and say, 'Hey, back off dude, I don't want any trouble from you.' "
He claims he slashed wildly with the knife in the darkness, not knowing he was inflicting horrific injuries on his ex-girlfriend.
"Whatever I did with my hand it was basically to get that person away from me, keep moving away," Malil told the jury.
It's very different from the dramatic account that Beebe gave the jury during her testimony.
She tearfully described how Malil stabbed her 23 times.
"He was so calm. He never raised her voice, he wasn't yelling, he was like, 'Yeah, right, you love me,' [then] bam!" said Beebe.