Chris Brown is heading back to rehab for a court-ordered 90-day stay.

The singer, who checked out of a Malibu, Calif. rehab facility last week after just 13 days, has been ordered back to rehab for the next three months by a Los Angeles judge after it was revealed that he was actually kicked out of the previous clinic for throwing a rock through his mother's windshield while she was visiting.

Brown's mother urged him to remain in the care of the rehab center for an extended stay, but he didn't take her advice too well, according to documents obtained by

Brown faced L.A. Superior Court Judge James Brandlin on Wednesday, and at the recommendation of the probation department, Brandlin ordered him to spend 90 days in a court-approved, live-in anger management program.

The singer will also have to submit to drug testing and take medication. He'll also have to put in 24 hours of community service per week over the course of his treatment.

Last month the singer was involved in an incident outside a Washington, D.C., hotel, when he allegedly punched a man who tried to get on his tour bus. TMZ reports that the judge in his rehab case wants the report on the incident, which could be determined to be a violation of his probation from his 2009 beating of then-girlfriend Rihanna. If so, he faces up to four years in prison.