Updated

Prosecutors say a man charged with trespassing at Selena Gomez's home has been sentenced to 45 days in jail and ordered to stay away from the singer-actress.

Los Angeles district attorney's spokesman Ricardo Santiago says Che Cruz admitted trespassing at an initial court appearance Wednesday and was immediately sentenced.

Cruz was arrested Sunday in Gomez's guesthouse and was charged Wednesday with one count of misdemeanor trespassing.

Santiago says Cruz was sentenced to three years of probation and ordered to stay away from Gomez and her home in Calabasas, Calif.

Authorities say Gomez arrived home Sunday night and called security after hearing noises on the property.

More On This...

Gomez rose to fame as the star of the TV series "Wizards of Waverly Place."