LOS ANGELES >> The pilot episode of Netflix’s hit miniseries “Baby Reindeer” presents viewers with the following message: “This is a true story.”

But how much of “Baby Reindeer” creator Richard Gadd’s fictionalized retelling of a life-altering encounter with a serial stalker is actually true? That is the question at the heart of a high-profile legal case that could influence how scripted adaptations of real events are handled by Hollywood going forward.

In June, the woman who allegedly inspired the stalker character in “Baby Reindeer” sued Netflix for negligence and defamation.

Fiona Harvey’s $170-million complaint accused the Los Gatos, Calif.-based streaming giant of telling “brutal lies” and attempting to “viciously destroy” her life in pursuit of money and viewers — all while advertising the series as a true story.

“This was a really great series that shows how the lines between telling a true story and the art of docudramas can raise unique legal problems,” said Jason Shepard, interim dean of Cal State Fullerton’s College of Communications.

The true-story genre has functioned as a reliable source of revenue and awards clout for Hollywood studios for some time, with projects ranging from blockbuster biopics (“Bohemian Rhapsody,” “Bob Marley: One Love”) to gripping TV docudramas (“American Crime Story,” “Inventing Anna”) launching to great success.

But portraying real people and events comes with real risks, and this is not the first time Netflix has been sued for defamation.

In June, the streamer settled a lawsuit filed by former New York City prosecutor Linda Fairstein, who alleged that she was unfairly depicted in Ava DuVernay’s Emmy-winning miniseries about the 1989 Central Park jogger case, “When They See Us.”

As part of the settlement, Netflix agreed to move a disclaimer (similar to the one attached to “Baby Reindeer”) from the end credits to the opening of the show. Fairstein did not receive any money from the agreement, and DuVernay stood by the portrayal.

John L. Krieger, an intellectual property attorney at Las Vegas law firm Dickinson Wright, said that the “Baby Reindeer” case could influence producers and studios to be “more cognizant about making sure that there’s no allegation that something truly is 100% accurate.”

Adapted from Gadd’s one-man show of the same name, “Baby Reindeer” stars Gadd as a struggling stand-up comedian whose life begins to unravel after a woman named Martha Scott (Jessica Gunning) develops an unsettling obsession with him.

The thought-provoking drama won six Emmys last month, including the prizes for limited series, lead actor (Gadd) and supporting actress (Gunning). It also was a massive commercial triumph, racking up more than 88 million views in its first three months on Netflix, according to the streamer.

The alleged “real Martha,” however, was not a fan.

Harvey’s complaint disputes Netflix’s depiction of Martha as a twice-convicted stalker who sexually assaults Gadd’s character, Donny Dunn, and is sentenced to five years in prison for her actions.

“Defendants told these lies, and never stopped, because it was a better story than the truth,” the lawsuit reads, “and better stories made money.”

In a statement, Netflix vowed to “defend this matter vigorously” and “stand by Richard Gadd’s right to tell his story.”

The streamer filed a motion in July to dismiss Harvey’s complaint on the grounds that Gadd’s creation is a form of protected speech and that “no reasonable viewer could understand ‘Baby Reindeer’ as making statements of fact about Harvey,” among other factors.

“Each alleged defamatory statement is presented in the context of stylistic, cinematic choices that reaffirm for the viewer that the Series is not a precise portrayal of historical fact,” the motion reads.

The court granted Netflix’s requests to scrap Harvey’s negligence claims and plea for punitive damages. But it upheld the defamation claim, which it deemed “both legally sufficient and supported by evidence.”