Justin Timberlake was granted a temporary restraining order on Friday against a woman his attorney described as an obsessed stalker, court records show.

Los Angeles Superior Court Judge David Cunningham III granted the "SexyBack" singer the protective order against Karen J. McNeil, 48.

Timberlake's attorney, Evan Spiegel, described McNeil in court filings as a "mentally unstable celebrity stalker." The papers state McNeil was placed in protective psychiatric custody by police after she trespassed at the singer's home on Thursday.

McNeil's actions have "become much more alarming and her motivation and obsession have become more ominous, intrusive and threatening," according to the filings.

The records said it's the third time McNeil has showed up at Timberlake's home and that she may be homeless. She left a letter characterized as "bizarre" during a trip to the singer's home in June, the records show.

Attempts to find a phone number for McNeil were unsuccessful.

Cunningham will consider whether to grant a three-year restraining order at a Nov. 9 hearing.

Timberlake, 28, has won multiple Grammy Awards for songs such as "SexyBack" and "Cry Me a River." His petition for a restraining order does not seek protection for anyone else.