STALKED: Rihanna stalker sentenced. PHOTO: EVAN AGOSTINI/AP

A California man who was arrested at Rihanna’s Hollywood Hills home last year, hoping to have sex with her, entered a guilty plea to stalking, vandalism and resisting arrest in connection with the May incident.

Eduardo Leon received five years probation in connection with the 9 May 2018 incident, in which a burglary charge was dropped, according to The Blast.

He had faced up to six years in custody in connection with the incident, according to officials.

Leon also has to enter into a programme for people who have committed crimes who have “mental health and/or substance use disorders”, the outlet reported.

The Umbrella singer, who was not in LA at the time of the incident, has a criminal protection order in effect against Leon, who authorities said spent 12 hours in her mansion before one of her assistants found him.

Leon is said to have jumped over a fence and disabled the alarm.

He settled in, unpacked a bag of his belongings and hooked up his phone to a charger, TMZ reported last year.

Leon told authorities he had hoped to have a consensual sexual encounter with the Diamonds singer by visiting her home, the The Blast reported.

[email protected]