Kylie Jenner is getting court-ordered protection ... from the guy who allegedly showed up on her property after trying to take a naked dip in her sister Kendall's pool.
A judge just ordered the 27-year-old man, Shaquan King, to keep at least 100 yards away from Kylie for the next 3 years. The restraining order also protects Kendall and Kris Jenner.
As we reported ... the man allegedly went straight to Kylie's gated community last month after he was released from jail. He'd been held behind bars for about 6 hours because cops picked him up at Kendall's home where he allegedly banged on her windows and skinny-dipped in her pool.
Since then Kendall's dramatically increased her personal security, and also gotten her own restraining order against King.
Kylie was present at Friday's court hearing, telling the judge over the phone King's alleged criminal background makes her fear for her life and her daughter's.
Kylie's legal team requested a 5-year restraining order, but the judge said the alleged harassment was "short-lived" and granted it for 3 years instead.