Chris Brown, seated, smiles as he appears with his attorney Mark Geragos, at a court hearing in the R&B singer's long-running case over his 2009 attack on Rihanna in Los Angeles on Friday, March 20, 2015. The judge closed Brown's assault case by revoking Brown's probation. (AP Photo/Mario Anzuoni, Pool)

Chris Brown, right, appears with his attorney Mark Geragos, at a court hearing in the R&B singer's long-running case over his 2009 attack on Rihanna in Los Angeles on Friday, March 20, 2015. The judge said Brown had completed community labor requirements as part of his felony assault case and officially closed the case after more than six years. (AP Photo/Mario Anzuoni, Pool)

Superior Court Judge James R. Brandlin ended Brown's felony probation on Friday, more than six years after the R&B singer brutally attacked his then-girlfriend hours before the Grammy Awards.

The attack erased Brown's squeaky clean image, which he has failed to regain in the ensuing years after incidents such as throwing a chair through a window after a contentious "Good Morning America" interview and a parking lot brawl with singer Frank Ocean. Brown's career has partially rebounded, with the singer performing at the 2012 Grammy Awards and winning a trophy for best R&B album.

Brandlin's decision marks the first time since mid-2009 that Brown will not be under the supervision of court or probation officials. The singer initially avoided problems with the case, but since 2013 has struggled to complete his community service obligations and had his probation revoked in January after he performed a show in Northern California without permission.

Brown and his attorney Mark Geragos hugged in the courtroom and again in a courthouse elevator. After the hearing, he tweeted, "IM OFF PROBATION!!!!!!!! Thank the Lord!!!!!!"

The case forced Brown, 25, to confront some deep personal issues: he says he witnessed domestic violence as a child and while in rehab, he was diagnosed as bipolar, a condition exacerbated by his frequent marijuana use.

The singer has alternated between appearing contrite and polite in court to defiant and angry on social media and in public appearances. Although he maintains a sizable and supportive fan base, known as team breezy, the case has stunted his career.

In February, Canadian immigration officials refused to allow him into the country, forcing him to cancel two shows, and British officials blocked his entry in 2010 forcing the cancellation of four performances.

The singer lost several months of his touring schedule last year dealing with repercussion from a fight in Washington, D.C., and issues he encountered in rehab.

"I couldn't be more delighted," Geragos said after the hearing.

"He is in a spot right now and a place right now that I couldn't be prouder of him," Geragos said of Brown. He said Friday's hearing was "a monumental feat for him."

Problems began in 2013 after prosecutors questioned whether he had complied with the terms of his community labor sentence and Brandlin briefly revoked his probation in a hit-and-run case filed against the singer over a fender bender.

Later that year, Brown struck a man outside a Washington hotel and was charged with misdemeanor assault. Brown was ordered into rehab but was dismissed from the facility for violating its rules and spent two-and-a-half months in custody, with U.S. marshals shuttling him between Los Angeles and the nation's capital for court hearings.

In another incident while in treatment, Brown threw a brick at his mother's car following a counseling session. The incidents occurred after Brown had completed court-ordered anger management sessions.

Brown missed the January deadline to complete his community labor sentence, which required him to perform manual labor such as roadside cleanup or graffiti removal.

Brown was 19 years old when he attacked Rihanna in a rented sports car after leaving a pre-Grammy Awards party. Brown fled the scene but turned himself in to police hours later and was subsequently charged with felony assault.

Celebrity website TMZ posted a photo of Rihanna's battered face, showing extensive injuries that a detective described in detail in a search warrant affidavit seeking phone records from both singers. Brown repeatedly punched Rihanna, bit her ear and choked her to the point that she nearly lost consciousness, according to the affidavit.

Brown pleaded guilty to felony assault in June 2009 and was ordered to stay away from Rihanna, although the order was later lifted and the pair rekindled their romance. They've since broken up.

The singers have collaborated on at least three songs together since the 2009 altercation, including the aptly titled "Nobody's Business" from Rihanna's last album, 2012's Grammy-winning "Unapologetic."

As part of his sentence, Brown was required to undergo domestic violence counseling. Brandlin also ordered Brown into rehab, which resulted in the singer being diagnosed with bipolar disorder, post-traumatic stress disorder and complications from substance abuse.