Coldplay frontman Chris Martin was granted a five-year restraining order against an alleged stalker deemed a “grave risk” to the singer on May 1, according to court documents obtained by Fox News.

A fan, identified as Ariana Joyce, was accused of making unauthorized visits to the singer’s California residence.

In his application for a temporary civil harassment restraining order, Martin claimed Joyce left letters that contained references to death, suicide and “delusions” about having a relationship with the singer, court documents state. The letters also purportedly mention his children — Apple, 14, and Moses, 13 — with ex-wife Gwyneth Paltrow.

GWYNETH PALTROW POSTS PHOTO WITH EX CHRIS MARTIN'S MOM, NEW MOTHER-IN-LAW ON INTERNATIONAL WOMEN'S DAY

Facebook posts included in court documents allegedly showed Joyce’s infatuation with Martin.

In a written response to Martin’s allegations, Joyce stated she was “confounded and confused” by the Coldplay frontman’s claims she was a “threat” to him, his children or his girlfriend, Dakota Johnson — whom she claimed she didn’t know.

Joyce asked the court to deny Martin’s request, claiming there was “no legitimacy” to support his case.

CLICK HERE TO GET THE FOX NEWS APP

Ultimately, Los Angeles Superior Court Judge Thomas Trent Lewis denied Joyce’s request and ordered her to stay at least 100 yards from Martin and his property for the next five years. The order similarly protects Martin’s two children and his girlfriend, actress Dakota Johnson. The restraining order is set to expire on May 1, 2024.

Editor’s note: A previous version of this article mischaracterized certain contents of Joyce’s purported letters to Martin.