Exclusive

Getty

Willow Smith[1] says she's being stalked by a man who trekked from Oklahoma to L.A. to try to get into her home ... according to new legal docs she filed to get a restraining order against him.

In the docs, Will[2] and Jada Pinkett[3]'s daughter claims 38-year-old Walter James Whaley climbed a fence to get onto her property around Christmas and appeared to be looking for a way to enter her house.

According to Willow ... her security called police and they showed up right away but Whaley wasn't apprehended at the time. However, she says cops found a Greyhound bus ticket indicating he'd traveled there from Oklahoma just a day before.

Willow included photos of the alleged incident that appear to show Whaley on her property, and she says this is frightening because it shows he "will do whatever possible to make physical contact with me."

According to the docs ... even before this all happened, Whaley had been hitting Willow up with social media posts saying he wanted to marry her and have kids with her.

She also says a private investigator she hired did some digging and determined Whaley is a convicted sex offender.

The judge granted Willow's temporary restraining order earlier this month. Whaley must stay 100 yards away from her at all times and stop communicating with her.

Read more from our friends at TMZ