'40-Year-Old Virgin' Actor Gets Life for Stabbing Shelley Malil gets life in prison for attempted murder of his girlfriend.

Dec. 18, 2010 -- Shelley Malil, an actor best known for his role alongside Steve Carell in "The 40-Year-Old Virgin," has been sentenced to life in prison for the attempted murder of his girlfriend.

A San Diego County Superior Court judge sentenced Malil Friday, three months after a jury convicted the actor of attempted premeditated murder and assault with a deadly weapon.

His ex-girlfriend, Kendra Beebe, survived the 2008 attack, but suffered punctured lungs and wounds to her neck, chest, back and arms. Malil stabbed her 20 times after he stopped by her home and found her drinking wine with another man.

In court Friday, Malil, 45, expressed regret for his crime and said he wants to be sent to prison.

"I want to do whatever I need to do to make sure I make right from the wrong that I did," Malil said. "Kendra Beebe did not deserve anything that happened to her. ... I can't even begin to imagine what she has been through." The actor, who played Carell's Indian-American colleague in the 2005 hit comedy -- will be eligible for parole in 12 years, according to the sentence. But prosecutor Keith Watanabe said Malil could be a free man in as few as nine years, given time served and good behavior.

"Despite the stab wounds he inflicted, I am alive," Beebe told the court. She went on to discredit Malil's testimony.

"During the course of the trial it became clear he was an actor, but not a very good actor at that. His testimony was lie after lie after lie," she said.

At trial Malil told the court that he visited Beebe at her home in suburban San Diego to apologize for taking personal items from her house and to warn that he had e-mailed sexually explicit photos of the couple to her co-workers. He then testified that he stabbed her with a kitchen knife after finding her with another man.

Malil faced a maximum penalty of life in prison with no possibility of parole for 14 years.

His attorney argued that Malil had no intention of killing Beebe when he picked up the knife after finding his ex-girlfriend with another man, and throughout the trial questioned Beebe's credibility as a witness.

The jury convicted the actor of the two most serious charges but acquitted him of a charge of residential burglary.

After the sentencing, Beebe told reporters she believed justice was served and that she hoped Malil's apology was sincere.

The Associated Press contributed to this report.