The singer lodged authorized papers saying Ariana Joyce, 42, believed she was in a “romantic relationship” with him and left a package deal at his house in Malibu, California.
The order was granted after Martin alleged she had been harassing him and endangering the protection of his household.
However she had not contacted him, the Los Angeles courtroom was advised.
Martin additionally alleged she wrote notes referring to demise, suicide and his two kids, Apple, 14, and 12-year-old Moses, whom he shares with ex-wife Gwyneth Paltrow.
Ms Joyce denied contacting Martin or understanding his girlfriend, the actress Dakota Johnson.
She mentioned: “I’ve no contact with Mr Martin and I have no idea Dakota Johnson.”
Ms Joyce alleged her house had been damaged into since she was accused of stalking.
She was later faraway from the courtroom after decide Kimberly Dotson mentioned she was being “disrespectful” for repeatedly speaking over her.
Choose Dotson refused Ms Joyce’s request to dismiss the case and ordered her to return to courtroom later this month.
The momentary restraining order granted to Martin final month stays in place, that means Joyce should keep a minimum of 100 yards away from him.
Martin, who was represented by Jeffrey Rosenfeld, didn’t seem in courtroom.
Martin and Paltrow’s divorce was finalised in 2016. She has since remarried.