Gilbert Arenas has been hit with a restraining order after a woman told authorities the ex-NBA star has been threatening to send naked videos of her to her son ... this according to docs obtained by TMZ Sports.
The woman claims she's been in an on-and-off relationship with Gilbert since 2016 -- but recently tried to end things for good.
Gilbert allegedly took the breakup badly and began harassing and threatening the woman and her 10-year-old son.
"Gilbert told me he was watching me at [my] son's school and that he had just saw him go into class," the woman wrote in docs filed in L.A. County Superior Court.
"He said he was waiting to get my son's cell phone number from his son so that he could send my child naked photos of me and video of Gilbert and I having sex and video of me naked."
The woman also claims on May 23, Arenas banged on her door and when he came in ... pushed her against the wall and demanded sex. She claims she obliged out of fear.
The woman included text messages she claims are from Arenas ... in which he says:
"Wait til u son see ur naked pictures. Imma start f*cking with your life. He has a phone right?"
She added, "When I break things off with him he becomes very vindictive so I try to oblige however he's feeling and try to soothe him. But I am very concerned that Gilbert would harm my child and or send photos and videos to my son's phone under the guise of someone else."
The woman asked the judge to order Arenas to stop contacting her and her son and NOT to send her son any photos or videos. Her request was granted by the judge ... at least temporarily. There's a hearing at the end of the month.
Gilbert has been ordered to stay 100 yards from them until the next court date.