Sarah Jessica Parker played a witch in 'Hocus Pocus.' Then she discovered her real-life ties to the Salem Witch Trials: 'This is unbelievable!'

Parker appeared on the premiere episode of NBC's "Who Do You Think You Are?" in 2010.

Sarah Jessica Parker is connected to the Salem Witch Trials. (Photo illustration: Yahoo News; photos: Who Do You Think You Are via YouTube, Everett Collection)
Sarah Jessica Parker is connected to the Salem Witch Trials. (Photo illustration: Yahoo News; photos: Who Do You Think You Are? via YouTube, Everett Collection)

Sarah Jessica Parker famously plays a witch — the spells, the brooms and the general running "amok, amok, amok" — in the 1993 Halloween classic Hocus Pocus. Her character, the ditzy and flirty Sarah Sanderson, is one of three sisters who were hanged in the infamous Salem Witch Trials of the 1690s, and they come back to life 300 years later to wreak havoc on the town where it happened.

ABC is showing a 30th anniversary version of the family-friendly cult classic on Sunday, Oct. 29. The true story of Parker's association with the witch trials, though, is much more terrifying than what we see onscreen multiple times every October.

Sarah Jessica Parker stars alongside Kathy Najimy and Bette Midler in 1993's
Sarah Jessica Parker stars alongside Kathy Najimy and Bette Midler in 1993's Hocus Pocus. (Everett Collection)

In the very first episode of NBC's former genealogy series Who Do You Think You Are?, which premiered in March 2010, the Sex and the City actress discovered that her maternal 10th great-grandmother, Esther Elwell, was one of the more than 150 people wrongly accused of witchcraft between 1692 and 1693 in colonial Massachusetts. As hysterical accusations of the devil's work swept through the area, 20 people were executed for their alleged crimes, all but one by hanging, based on so-called spectral evidence, messages that accusers said had been sent to them through visions or even dreams.

The court that had been formed specifically to deal with the many accused witches accepted it as fact, as was the case with Elwell.

While waiting for details on Elwell's connection to the shameful era, Parker was rightly distressed.

"If we were involved, in the way that is the least likable, the most objectionable," SJP said, "I would really want to, you know, somehow — and this is of course ridiculous — fix it."

Then a historian showed Parker an arrest warrant for Elwell, who was one of three women alleged to have caused a woman named Mary Fitch to become sick and die.

Parker was relieved at first to see Elwell had not been an accuser, but disbelief and sadness soon followed. Someone had claimed to have visions of three people "in their likeness," "pressing, squeezing and choking" Fitch before she died.

"When you read these charges, it's so absolutely crazy. It's crazy time," Parker said as she searched for words. "It's madness!"

She noted the courage that the accused would have had to possess.

"I'm kind of feeling really worried actually now, because I realize she might not have lived. She might have been hung," Parker said. "And now... honestly I'm so worried. I'm so... kind of nauseous. You can't believe that charges like this would have any weight."

But Parker was happy to discover later in the show that Elwell survived by sheer luck.

As historian Mary Beth Norton explained to her, Elwell's trial was to have taken place Nov. 8, but the court was dissolved on Oct. 22.

"They'd finally decided, by the end of 1692, 'We've been convicting people on the evidence of the devil, and this is a terrible mistake,'" said Norton, author of In the Devil's Snare: The Salem Witchcraft Crisis of 1692. "In fact, this is the last formal accusation. This is the end of the Salem Witchcraft Crisis, this accusation against Esther Elwell."

Of course, Parker was thrilled to learn that Elwell lived for decades, until she was 82.

"This is unbelievable! What a bit of good luck," she said. "Who knows what would have happened to our family had the witch hunt continued?"

At the end of the episode, she visited a snowy graveyard where those killed in the witch trials are buried.

"This has been such a moving experience for me," Parker said, "I want to pay my respects to those who were not as fortunate as Esther."

Parker and her onscreen sisters are expected to reprise their roles in Hocus Pocus 3, although when is unclear. Screenwriter Jen D'Angelo, one of three people who penned the second installment, told Entertainment Weekly just this week that filmmakers are "working on it," though they're "still in the story phase."

The 30th anniversary screening of Hocus Pocus airs Sunday, Oct. 29 at 8 p.m. on ABC.