John Mayer has been granted a temporary restraining order against an obsessed fan after receiving multiple threats.

According to court docs, 39-year-old Ryan Jeremy Knight began harassing Mayer and his team in March, according to E! News.

The “New Light” singer claims that initially, Knight started stalking and harassing just him, but things took a turn when the alleged culprit started making violent threats to Mayer’s team via social media.

JOHN MAYER ANNOUNCES FOUNDATION SERVING VETERANS

Court docs show that Knight allegedly told Mayer, “I’ve put many a jew in the hospital.” Mayer’s father is Jewish.

Knight also reportedly referred to famous murderers like Ted Bundy and John Lennon’s killer Mark David Chapman.

The scary reality of the situation set in when Knight showed up to Mayer’s performance in North Carolina on June 28. Fortunately, the 41-year-old star’s security team found Knight and escorted him off the premises.

JOHN MAYER SAYS EARLY FAME MADE HIM A 'MONSTER'

John Mayer performs at Madison Square Garden on July 25, 2019 in New York City. The

John Mayer performs at Madison Square Garden on July 25, 2019 in New York City. The "Daughters" singer had to get a restraining order against an obsessed, anti-Semitic fan. (Getty)

JOHN MAYER SINGS HYMN 'HOW GREAT THOU ART' IN TOUCHING TRIBUTE TO CHRISTCHURCH MASS SHOOTING VICTIMS

A shaken Mayer thus pursued legal action as Knight’s threats have caused the singer to “suffer substantial emotional duress,” according to court filings.

A judge ordered that Knight must stay 100 feet away from the singer and his home and a followup court hearing is scheduled for August 27 to determine if the restraining order should be made permanent, the site reports.

The songwriter is currently on a worldwide tour and is set to perform in Chicago on Thursday.

CLICK HERE TO GET THE FOX NEWS APP

A rep for Mayer did not immediately respond to our request for comment.

This article originally appeared on Page Six.