Charlize Theron is getting nightmares because of her latest movie role.

The actress is producing and starring in the film version of the best-selling thriller Dark Places. In it, she plays Libby Day, a tormented soul who witnessed at age 7 the ruthless slaying of her mother and two sisters, in what appears to be a satanic cult ritual.

The story line hits very close to home for the South African-born actress, who was 15 when she witnessed the slaying of her abusive, booze-swilling dad — by her own mother.

Charlize’s mom grabbed a shotgun and blasted away the man who had threatened their lives duirng drunken rage. The shooting was ruled self-defense and Charlize’s mother, Gerda Maritz, faced no charges. The actress has called her father’s death “the great tragedy of my life.”

And while the 38-year-old has tried to move on from the traumatic experience, she’s still haunted by the incident, says the source.