Image copyright STX Films Image caption Left-right: Lili Reinhart, Jennifer Lopez, Keke Palmer and Constance Wu in Hustlers

The woman who inspired Jennifer Lopez's character in Hustlers is suing the film's makers for $40m (£30m).

In the lawsuit, Samantha Barbash accuses film companies including STX Films and Lopez's Nuyorican Productions of using her likeness and defaming her.

In response, STX said it would "defend our right to tell factually based stories based on the public record".

Hustlers is the fictionalised story of Barbash and other women who drugged and swindled rich men at strip clubs.

Barbash was the alleged mastermind of the ring and was sentenced to five years' probation for conspiracy, assault and grand larceny after it came to light.

The movie was based on a 2015 New York Magazine article about the gang, but Barbash has said she declined to sell her rights to the movie's producers, saying they offered her "peanuts".

Image copyright Reuters Image caption Lopez with director Lorene Scafaria and the Spotlight Award at the Palm Springs Film Festival

Lopez was nominated for a Golden Globe for playing the role of Ramona in Hustlers, which has made $157m (£120m) at global box offices since its release in September.

The actress has described her character as "unapologetically savage". Last April, Barbash told the New York Post that Lopez was misrepresenting her and she was never a stripper.

According to the New York Post, the court papers said: "Anyone who views the film will believe Plaintiff to be an individual of little to no moral or ethical values, devoid of any loyalty to her colleagues, under the influence of hard drugs, and with misandrist tendencies."

Barbash's lawyer Bruno V Gioffre Jr told Rolling Stone: "My client is offended that the defendants used her likeness to make over $150m, defamed her character and tried to trick her into selling her rights to the production company for a mere $6,000."

Barbash posted a screenshot on Twitter of TMZ's story about the lawsuit, followed by a post confirming "it's true".

A spokesman for STX Films told US media: "While we have not yet seen the complaint, we will continue to defend our right to tell factually based stories based on the public record." A representative for Nuyorican Productions declined to comment.

Hollywood vs real life

Real people who have been portrayed on screen do not have a good track record of success when suing movie and TV companies.

Oscar-winning actress Dame Olivia de Havilland sued the makers of US TV drama Feud after objecting to how she was depicted in the series. But she lost, with the judge deciding: "Whether a person portrayed in one of these expressive works is a world-renowned film star - 'a living legend' - or a person no-one knows, she or he does not own history. Nor does she or he have the legal right to control, dictate, approve, disapprove or veto the creator's portrayal of actual people."

after objecting to how she was depicted in the series. But she lost, with the judge deciding: "Whether a person portrayed in one of these expressive works is a world-renowned film star - 'a living legend' - or a person no-one knows, she or he does not own history. Nor does she or he have the legal right to control, dictate, approve, disapprove or veto the creator's portrayal of actual people." Iraq war veteran Sergeant Jeffrey Sarver tried to sue the makers of Oscar-winning film The Hurt Locker , saying it was based on him and that he was presented in a false light, which led to ridicule by his colleagues. But in 2016, an appeals court ruled: "The Hurt Locker is speech that is fully protected by the First Amendment, which safeguards the storytellers and artists who take the raw materials of life - including the stories of real individuals, ordinary or extraordinary - and transform them into art, be it articles, books, movies, or plays."

, saying it was based on him and that he was presented in a false light, which led to ridicule by his colleagues. But in 2016, an appeals court ruled: "The Hurt Locker is speech that is fully protected by the First Amendment, which safeguards the storytellers and artists who take the raw materials of life - including the stories of real individuals, ordinary or extraordinary - and transform them into art, be it articles, books, movies, or plays." Lawyer Andrew Greene sued the makers of The Wolf of Wall Street for defamation, saying the character Nicky "Rugrat" Koskoff was based on him, and reportedly took issue with scenes showing things like the character partying with prostitutes at a party with illegal drugs on silver trays. But a judge rejected his lawsuit.

for defamation, saying the character Nicky "Rugrat" Koskoff was based on him, and reportedly took issue with scenes showing things like the character partying with prostitutes at a party with illegal drugs on silver trays. But a judge rejected his lawsuit. Perri "Pebbles" Reid, the former manager of R&B group TLC, sued Viacom for $40m over Crazysexycool: The TLC Story , a VH1 movie that she said made her out to be "an unethical and dishonest businesswoman". A judge allowed Reid to take Viacom to trial, but the two sides reached a settlement before the case reached court.

, a VH1 movie that she said made her out to be "an unethical and dishonest businesswoman". A judge allowed Reid to take Viacom to trial, but the two sides reached a settlement before the case reached court. The Atlanta Journal-Constitution newspaper has threatened to sue director Clint Eastwood and Warner Bros, saying the paper and its staff were "portrayed in a false and defamatory manner" in Richard Jewell, which is released in the UK later this month. The film has caused controversy for showing the paper's late reporter Kathy Scruggs trading sex for information.

Follow us on Facebook, or on Twitter @BBCNewsEnts. If you have a story suggestion email entertainment.news@bbc.co.uk.