Josh Groban has been granted a five-year restraining order against an obsessed fan.

The 39-year-old singer / songwriter previously received a temporary restraining order in June against Shawna Marie Laing, who had allegedly been ''sexually harassing and threatening the singer since he canceled a date with her'' in 2011, TMZ reports.

And now a judge has granted Josh a five-year order against the fan, which will be valid until August 27, 2025.

The restraining order states that Laing needs to stay 100 yards away from Groban, his family and his actress girlfriend Schuyler Helford, 29, who he has been dating since 2017.

Laing had sent Groban a number of graphic and sexual messages in May, including one that read: ''I came at approximately 7:09 PM this evening with the thought of your d*** between my t*** and your warmness against my ribcage.''

She also referenced his girlfriend in some messages, including one which read: ''You wanna try honouring the home we're going to have children in by not f****** other women in it.''

He revealed she left a package at his home in May, which included a small skull, a flower and a book with handwritten notes that were sexual in nature.

Groban previously explained he met the woman in 2001 through a mutual Facebook friend and, after flirting online, they arrange a date.

However, he cancelled due to illness and she started to pester him repeatedly, leading Groban to rule out ever meeting her in person.