Rihanna isn't messing around with her security.

A California judge has granted the pop superstar a three-year restraining order against an alleged stalker.

Per the keep-away order issued today in Los Angeles Superior Court, Steveland Barrow must stay at least 100 yards away from Rihanna as well as her home and workplace—in this case, her RocNation management offices—during that time frame.

The 31-year-old intruder was collared after allegedly breaking into a neighbor's house believing it was Rihanna's residence, sleeping in what he thought was her bed, and having numerous pieces of poetry in his possession that he hoped to give the Diamonds diva.