5:12 PM PT -- According to legal docs, obtained by TMZ, the order was granted.
Billie Eilishis seeking court-ordered protection from a man she claims is harassing her and is potentially dangerous.
The singer filed docs seeking a restraining order against a man named John Hearle, who she claims has been harassing and threatening her from outside her Los Angeles home.
Billie says the guy has been camped out at a school across the street from her crib since the summer, and he's been bombarding her with threatening and disturbing letters.
According to the docs, Billie says she got a note from Hearle saying ... "You can't get what you want, unless what you want is to die for me ... You will know that soon the water will rise, and you might very well die ... You will die."
Billie claims Hearle watches her enter and exit her home, and she says he always says something to her or makes gestures -- including a throat-slitting move -- whenever he sees her.
In the docs, Billie says this is making her anxious every time she comes home and she fears for her safety and her family's too.
Law enforcement sources tell TMZ ... the LAPD is investigating, but hasn't made an arrest yet. Billie wants a judge to force Hearle to stay at least 200 yards away from her and her parents at all times.