Receive the latest celebrity updates in your inbox

A somber Chris Brown stood at attention as a California judge handed down his sentence on Tuesday.

Brown was sentenced to five years of felony probation and 180 days of community labor in a Los Angeles courtroom Tuesday, where L.A. Superior Court Judge Patricia Schnegg told the singer he couldn't come within 100 yards of Rihanna for the probation period.

Brown was also required to complete a one-year domestic violence counseling program and pay a $2,500 fine. Schnegg agreed to allow Brown to perform his community labor and counseling program in Virginia, where he lives.

Brown showed up to the courtroom wearing a dark three-piece pinstriped suit and dark tie, standing silently next to attorney Mary Geragos as the sentence was read.

Chris Brown & Rihanna: Romance Gone Awry

Schnegg also said she knew Brown had been spotted in the same spots as Rihanna -- and wouldn't take any violation of his probation. Brown cannot contact Rihanna or come within 100 yards of the singer for five years.

"I am not amused with the chatter that has been on the airwaves and any violation of your probation in this case comes with the potential for state prison," a stern Schnegg told Brown.

Famous Mug Shots: Judge Reinhold

Schnegg said she wanted to make sure that Brown performed hard physical labor -- not community service.

Brown said in a probation report released after the sentencing that he was "depressed" and "does not want to carry on that cycle" of sadness.

Another probation report prepared for the sentencing said that Brown and Rihanna had been involved in violent altercations twice before.

Rihanna first slapped Brown during an argument about three months before the February beating while the couple was traveling in Europe, and Brown retaliated by shoving her into a wall. Brown also broke the front and passenger side windows of a Range Rover after a fight the two had in Rihanna's home country of Barbados, according to the report.

Brown pleaded guilty to assaulting his ex-girlfriend, Rihanna, in June. He was arrested after the pair fought hours before February's Grammys. Rihanna was not in court for the sentencing hearing, but her attorney, Donald Etra, was present.

Brown will be back in court on Nov. 19 to show progress on his community labor and counseling program.