The ex-friend, Shakur Sozahdah, is requesting a restraining order against Brown's baby mama -- and in the docs she says Nia's been parking in front of her house and "sprinkling a weird substance" in her yard. Shakur also claims Nia's been texting her like crazy and bad-mouthing her and other family members.
As for why? According to the docs, Nia's been begging Shakur for a face-to-face meeting. Shakur claims she's a witness in Nia's custody battle over 3-year-old Royalty ... and thinks Nia is using scare tactics so she won't testify against her.
Nia denies the allegations, and according to a rep ... she hasn't seen Shakur since early 2017. Still, the judge granted the restraining order, forcing Nia to stay 50 yards away from Shakur.
Shakur is the same woman Nia accused of threatening her, and in fact got a restraining order against her on Tuesday.