An actor who appeared in the movie "40-Year-Old Virgin" will be released from prison where he was serving a life sentence for repeatedly stabbing his ex-girlfriend more than 20 times in August 2008.

Tuesday’s decision was an affirmation of a prior parole board decision, a spokesman for the California Department of Corrections and Rehabilitation said.

In 2010, Shelley Malil was sentenced to life in prison with the possibility of parole for stabbing his ex-girlfriend in the backyard of her San Marcos home while her preschool-age children slept upstairs.

Malil went to his ex-girlfriend Kendra Beebe’s home, drunk and angry, according to news reports and court transcripts of his attempted murder trial. When he saw Beebe sitting in her backyard with another man, he calmly walked up to her, leaned into her as if to kiss her, but then plunged a large kitchen knife into her torso three times.

In January, at his first hearing before a board of parole commissioners, Malil took responsibility for his crime for the first time.

“I wasn’t trying to hurt her,” he told the parole commissioners, according to a story in the San Diego Union-Tribune. “I was trying to murder her.”

The board granted Malil parole three months ago, but Governor Jerry Brown intervened and asked the 15-member parole board to review Malil’s grant of parole.

Gov. Brown can revoke parole, but only in cases of murder.

In a two-page letter to the parole board, Brown wrote there was not a reasonable explanation for why Malil’s “rage escalated so far out of control, and resulted in such a prolonged horror.”

When Beebe’s male friend wrestled the kitchen knife from Malil’s hands that violent August night in 2008, the then-45-year-old actor broke a wine glass to continue stabbing and slashing his ex-girlfriend more than 23 times.

He testified at trial he was acting in self-defense, and it was dark, so he could not see who he was stabbing.

Malil played Haziz, a co-worker of Steve Carell’s character in “The 40-Year-Old Virgin.” He told the parole board in January that acting work was drying up in 2008, and he became an alcoholic with troubled relationships.

One plunge of the knife came within a centimeter of Beebe's carotid artery, the San Diego Union-Tribune reported. During the prolonged attack, she suffered a punctured lung. Her chin was nearly sliced off.

Malil served eight years of his 12 years-to-life sentence. He was paroled in January. A spokesman for the California Department of Corrections and Rehabilitation said he will be released to parole supervision in approximately two weeks.

District Attorney Summer Stephan said she was very disappointed by the parole board's decision.

"The victims have endured tremendous physical and emotional pain," Stephan said. "To approve this individual for release, given his violent attack, ignores the very real danger he poses to public safety.”

The California parole board wrote in their findings that Malil is low risk for future acts of violence, if he remains sober.