Los Angeles, May 17: The man arrested for stalking and burglary inside singer Taylor Swift's apartment last year has been sentenced to six months in prison.

Mohammed Jaffer pleads guilty to attempted burglary in the second degree, the Manhattan District Attorney's Office told E! News. Besides jail time, Jaffer has been given five years on probation where he has to continue mental health treatment in Michigan.

The judge sentenced him yesterday to the jail time and probation that was promised last week. Last March, Jaffar was arrested in Swift's New York City building for burglary, stalking and trespassing. Meanwhile, Swift filed a restraining order against Julius Sandrock yesterday. According to court documents, the 38-year-old Colorado man was arrested outside the singer's mansion in Beverly Hills in April for stalking and probation violation. Swift has not commented publicly on either case.