Lori Shepler / Invision/AP 1 / 3
Lori Shepler / Invision/AP 1 / 3

LOS ANGELES (AP) -- A judge says Chris Brown must serve five years of probation and perform six months of community labor for beating

Rihanna.

The 20-year-old appeared in court Tuesday afternoon to be formally sentenced for the February attack on his then-girlfriend.

Brown's sentence will be served in his home state of Virginia. He will have to return to Los Angeles frequently to update a judge on his progress.

Brown was arrested hours after the February attack and pleaded guilty to felony assault in June.