Getty

Ashley Benson I NEED PROTECTION FROM MAN SEEKING SEXUAL RELATIONSHIP W/ ME

Ashley Benson says a man has been stalking and harassing her and threatening to kill himself ... and now she's asking a judge for help.

The actress beelined it to court and filed for a protection order against a 20-year-old man she claims has been incessantly seeking a sexual relationship with her and is threatening to shoot himself if she doesn't at least interact with him, even though she says she never even gave him her number.

In the docs, obtained by TMZ, Ashley claims the guy keeps blowing up her phone ... and she says he's also messaging her incessantly on social media.

It sounds pretty scary ... Ashley claims the man often references the use of a gun ... and she says the guy sends her audio messages where he's sobbing and threatening to kill himself.

Ashley claims the man has been harassing her online for over a year but she says things ratcheted up recently ... she says he's tracked her location using social media and approached her in a frightening and threatening manner.

AB says she blocked the guy's phone number and he responded by calling her from 40 different numbers.

Ashley is asking a judge to prohibit the guy from contacting her and keep him at least two football fields away from her home, job and car.

Click here for info about our online advertising practices.