What do the Michael Jackson child-abuse allegations and Heidi Fleiss have in common? Besides being two Hollywood stories that turned a sleepy summer into a media feeding frenzy bigger than an East Hampton clambake, both productions are being script-doctored by Anthony Pellicano.

Pellicano is the Hollywood private eye reportedly hired by Columbia production president Michael Nathanson to investigate who was spreading rumors connecting him to the Heidi prostitution ring. Shortly thereafter, Nathanson was replaced by Lisa Henson. Then last week, Pellicano surfaced again as Jackson’s private eye. The Chicago native was all over the nightly news, explaining that the LAPD investigation into Jackson was the result of a $ 20 million extortion attempt. He first accused the child’s mother, but later said he may have been mistaken.

Pellicano, who specializes in high-tech phone surveillance and audiotape analysis, arrived in town in 1983 after attorney Howard Weitzman hired him to analyze government tapes in the John DeLorean cocaine trial. Weitzman also reps Nathanson and Jackson.

But the man whose mantra is “Make ’em afraid of the dark” is not afraid of a little low-tech persuasion: Pellicano bragged to a GQ magazine writer that he once took a baseball bat to a foe. That hasn’t fazed his fans.

“Anthony is the court of last resort for those of us who lead unconventional lives and just want to live our lives,” says one Pellicano client.

But here’s the rub: Pellicano has also worked frequently for the National Enquirer, the arch-nemesis to many a Hollywood star. Roseanne Arnold publicly vilified the detective after she hired him to find her long-lost daughter and then suspected Pellicano was actually working for the tabloid, which broke the story of Arnold’s offspring. Pellicano denied a conflict.

One Hollywood client says he’s indeed disturbed by Pellicano’s apparent willingness to work both sides of the street. But then again, he added, that has its advantages: “If the Enquirer was gonna do something about me, I’d be the first to know.”

Pellicano, who reportedly flew to Bangkok last week to be with Jackson, did not return repeated calls or answer faxed questions. But one source says the the Jackson flap is merely an intermission to the main act of Madam Heidi. He suggests that Pellicano may have been hired by someone at Sony to set up a high-level current or former Sony exec to take the fall for the Heidi scandal. Sony offered no comment.

That sort of intrigue could add a nice third act to Pellicano’s own script. Director Michael Mann is helping his friend the detective drum up interest in a biopic about his adventures.