Ray Allen claims he was catfished by a man pretending to be a number of attractive women -- and now he's filed legal docs to make sure the alleged catfisher doesn't leak his private information.
It's all in legal docs obtained by TMZ Sports ... the ex-NBA superstar claims he met these "women" in "various online forums" and communicated with them ... sometimes sharing "private information."
Ray claims he eventually figured out he was being catfished and ended the relationships -- but the man behind the rouse became obsessed and began posting items on social media about Ray and his family.
In the docs, Allen claims the man would physically go to Ray's wife's restaurant in Orlando and post about Ray -- tagging family members in the posts. Creepy stuff.
Ray says he got the guy to sign a confidentiality agreement in which he agreed to stop posting about Ray -- but the guy violated the deal.
Things continued to escalate -- and the man eventually filed for a restraining order against Ray claiming the NBA star was stalking him, which the court granted.
Ray is adamantly denying the stalking allegations and is now seeking a restraining order of his own.
"Ray wants nothing to do with [the alleged catfisher] and merely wants to be left alone," Allen says in the court docs.
We spoke with Allen's attorney, David Oscar Markus, who tells us, "Ray Allen was the victim of an online scheme to extract money and embarrass him by someone who appears to be troubled."
"The person who perpetrated this scheme has now started to stalk him and make threats against Ray and his family. Ray has taken legal action to put an end to the threats and to expose his manipulation and wrongdoing."
"Ray regrets ever engaging with this person online and is thankful they never met in person. This experience has negatively impacted Ray, and he hopes that others might use his mistake to learn the dangers of communicating online with strangers."