Facebook is threatening legal action against the Daily Mail amid a dispute over the headline of a front page story that named the social networking website in the context of a story about a paedophile gang operating in Devon.

Friday's Mail splashed with the headline "How many more victims of Facebook sex gang?", after parents of 16,000 pupils in Torbay were warned of an ongoing "complex child abuse investigation" that may involve 20 or more victims in the area.

That prompted an angry reaction from Facebook, which said there was no evidence to support the allegation that the social networking site was used to facilitate the sexual exploitation of children in this case.

Facebook complained to the Daily Mail, and the newspaper changed the wording of the headline online pending a further investigation. The website – which is trying to adopt a tough stance against the Mail – also demanded an apology in print.

However, the Mail believes it has no reason to apologise and insiders said the newspaper had good reason to believe the mention of Facebook in the headline was appropriate. A spokesman for the Mail said: "We stand by our story."

Unhappy with the standoff, Facebook had decided to enlist its lawyers, Osborne Clarke, to examine whether the social networking company can sue the newspaper or whether it should submit a complaint to the Press Complaints Commission.

In response to questions from MediaGuardian.co.uk, a spokeswoman for Facebook said there was "no evidence" that the website was used to "facilitate these crimes". She added: "While the inaccurate headline was quickly changed online, the damage of being wrongly tied to this story on the front page is worthy of an apology – to both Daily Mail readers and Facebook – of equal prominence."

The Mail's headline was partly based on a statement made by detective inspector Simon Snell, who said that grooming of children in the area "may have occurred on the internet" and that officers were "keeping an open mind with regards to Facebook, Bebo and other sites".

But Devon & Cornwall police, handling the investigation, this week indicated in private that in this case sites such as Facebook were not used as grooming tools, but for potential witnesses and victims to communicate with each other.

One man, Jake Ormerod, 19, has been charged with two sex offences as a result of the investigation by Devon & Cornwall police. Saturday's Mail and the Mail Online website featured pictures of Ormerod taken, it is understood, from his Facebook page.

Friday's front page story as printed is no longer available on Mail Online. A heavily rewritten version appears instead with the pictures of Ormerod, which includes a reference to children being groomed on websites "including Facebook".

It is not the first time Facebook has locked horns with the Mail. In March the social network extracted an apology from the Mail after the newspaper said that a man posing as a 14-year-old girl who had created a profile on Facebook had been approached "within seconds" by older men who wanted her to perform a "sex act" in front of them. The author of the piece had in fact logged on to another, unnamed, "well-known" social networking site.

Facebook argues that while it may be possible to groom child victims on the site – it is also possible to do so through a very wide range of techniques, technologies and websites. The company also argues it cannot be held responsible for the illegal actions of people who may have Facebook pages and that all child abuse ultimately takes place offline.

Facebook said it had "not ruled out legal action" as it waited to see how or if the newspaper would respond.

• To contact the MediaGuardian news desk email editor@mediatheguardian.com or phone 020 3353 3857. For all other inquiries please call the main Guardian switchboard on 020 3353 2000.

• If you are writing a comment for publication, please mark clearly "for publication".