Rihanna said she had suffered emotional distress due to the Jonathan's multiple break-ins.

Rihanna has secured a permanent restraining order against a stalker after he broke into her Los Angeles home a number of times.

Jonathan Whooper, who allegedly claimed that he was the singer's "future husband" after he was arrested for trespassing at the 25-year-old star's home, has been ordered to stay away from her for the next two years.

A judge granted the Pour It Up hitmaker the protection order because she had suffered "substantial emotional distress and concern for her personal safety" because of the break-ins.

Whooper must stay at least 100 yards away from the singer at any time. He must also undergo a mental competency assessment to determine whether he is mentally fit to stand trial for attempted burglary, vandalism and stalking.

Earlier in October, the Diamonds star was granted a temporary restraining order after police arrested Whooper at her mansion.

Investigators identified Whooper as the same person who broke into her home in September and threw a chair through a glass door.

According to court documents obtained by TMZ, Whooper told security guards he was Rihanna's future husband and was scheduled to marry her .

In June, Robert Melanson was jailed for six days and put on three years' probation for trespassing on Rihanna's roof.