Che Cruz, a man who has been stalking Selena Gomez, was arrested twice for trespassing on the singer’s property, and has pleaded no contest to felony stalking in a court on Friday.

The 20-year-old stalker will be “on lockdown” for 30 days for treatment in a mental health facility and will have to complete a total of 180 days there, media reports said, citing the Los Angeles County district attorney’s office. Cruz has also been ordered to stay at least 300 feet away from Gomez and her house for the next 10 years.

Cruz was first arrested on March 30 after breaking into the 21-year-old "Slow Down" singer’s guest house on her property in Calabasas, Calif. He received a 45-day sentence in prison but served only two days of the sentence. He was again arrested on April 4 for violating a protective order and for being found “near the vicinity,” shortly after being released from jail.

Gomez, who has been in an on-again, off-again relationship with Canadian singer Justin Bieber, has dealt with a similar situation in the past when a man named Juan Garcia was reportedly arrested after creeping around Gomez’s Fernando Valley's Tarzana home.

According to reports, Gomez and Bieber have again recently sparked romance rumors.

"It has been a while coming, but Selena has agreed to a reconciliation. It was when she agreed to go to his house that he gave her the new, shiny Segway," an insider reportedly revealed to British newspaper The Sun recently.

"He told her he can't live without her and that he's reformed his bad- boy ways for good."

A source also reportedly said that Gomez’s family members are “worried about her reconciliation” with Bieber, whom she first began dating in 2010, because they feel he is a bad influence.