In a bizarre rant on Twitter, singer Chris Brown complained about having to do an additional 1,000 hours of community labor for his assault on Rihanna and called the Los Angeles County district attorney "racist."

Brown and his attorney, Mark Geragos, struck a deal last week to resolve issues involving potential violations of his felony probation and the number of hours he completed.

As part of the deal, the district attorney's office withdrew its motions challenging the number of hours he completed and a potential violation connected to a hit-and-run charge, which was dismissed this week.

Brown was convicted in 2009 for assaulting his then-girlfriend Rihanna and must complete the hours by Aug. 25, 2014.

But Brown--who was heard in court telling his attorney he wanted to say something but eventually did not--took to Twitter on Thursday night.

"[I] done 6 months community service wit the police and DA racist ... crying to the judge that i didn't do it. [expletive] the SYSTEM," Brown's official account posted.

Brown then added that officials should be doing more for Los Angeles' homeless.

"How about y'all take care of all the homeless kids and families on skid row," he wrote to his 13 million followers.

Brown then referenced his recent painting of large, monster-like creatures on the exterior walls of his Hollywood Hills home, which led to neighbor complaints, a city citation and a legal battle over murals.

"I paint pics of monsters because its a reflection of u [disparaging name] and this [disparaging word] system!

Brown then added on Twitter, "Family first! THE LAW...last."

Los Angeles County District Atty. Jackie Lacey is African American and not shy about questioning Brown's compliance with his court-ordered labor regarding the Rihanna conviction.

In a statement earlier this year, she said Brown failed to provide “credible, competent or verifiable evidence” that he completed 180 days of community labor in his home state of Virginia.

Geragos said Brown had completed his court-ordered labor.

But on Feb. 5, Deputy Dist. Atty. Mary A. Murray filed a motion outlining a series of inconsistencies with a report prepared by Richmond, Va., police about the number of community service hours Brown had served.

Murray said a review of Brown's community service claims found "significant discrepancies indicating at best sloppy documentation and at worst fraudulent reporting," and she asked a judge to order Brown to carry out his court-ordered labor in Los Angeles County instead of Virginia, where he lives.

In one instance, prosecutors said Brown claimed he completed four hours of trash pickup between 10 a.m. and 6 p.m. on a day when he was actually on a private plane heading to Cancun, Mexico, that he boarded at 4 p.m.

Another time, prosecutors said the entertainer claimed he was picking up trash in Richmond, while news photographers were snapping him 100 miles away in Washington, D.C., where he hosted a charity event that raised funds for the developmentally disabled, prosecutors contended.

Geragos had vigorously disputed those claims.

Judge James Brandlin made no finding that Brown had violated the probation--or lied about the hours worked. Instead, he reinstated probation, with the modification of 1,000 hours of community labor.

Under the terms, which were announced after three closed-door sessions with the judge and attorneys, Brown's community labor options include work for Caltrans or cleaning up beaches or graffiti or a work program.