Miley Cyrus has obtained a temporary restraining order against an Arizona man detained by police while trying to meet the singer-actress.

A Los Angeles judge granted Miley the order against 24-year-old Devon Meek. Miley's court filing states that the Sierra Vista man believes the singer is communicating to him through her songs.

The filings say Los Angeles police took Meek into custody on May 16 and he was placed under a psychiatric hold. Meek was arrested outside a property he believed was owned by Miley, according to the filing.

A detective wrote in a statement that Meek told officers they should shoot him in the head if he could not meet Miley.

Meek remains in protective custody.