LOS ANGELES — A judge reinstated Chris Brown’s revoked probation Friday and gave the singer a new sentence to perform 1,000 hours of community labor such as cleaning beaches or highways, removing graffiti or performing other chores assigned by the probation department.

Brown’s current legal troubles are the latest repercussions of his arrest four years ago for assaulting his former girlfriend, Rihanna.

The popular R&B singer sat in a courtroom for nearly an hour as his lawyer, Mark Geragos, and a prosecutor shuttled in and out of the judge’s chambers, with Geragos apparently seeking his client’s approval for a plan to keep him from facing more serious consequences.

Superior Court Judge James Brandlin finally emerged and announced that an agreement had been reached.

Deputy District Attorney Mary Murray withdrew a request to rescind Brown’s probation because of a hit-and-run charge that was dismissed in another court Thursday.

Brandlin then told Brown he must perform 1,000 hours of community labor with one of four public programs: California Department of Transportation highway cleanup, graffiti removal, beach cleanup or Probation Alternative Work Services.

Brown, 24, didn’t speak during Friday’s hearing, other than to agree to the deal worked out while he waited in the courtroom with his mother and two other people.

The singer has been in and out of court since pleading guilty to the 2009 assault on Rihanna.

Besides making reports on fulfilling the requirements of an earlier order for community labor, he has had subsequent run-ins with the law for assault and traffic accidents.

The work that Brown did previously does not apply to the new sentence, said district attorney’s spokeswoman Jane Robison.

Brown has a year to perform the work and is scheduled to appear in court Nov. 20 for a progress report.

Brown, who won a Grammy in 2011 for Best R&B Album with “F.A.M.E.,” could ask the court to end his probation when he completes the community labor, but the final decision on the length of probation will be up to a judge.

o o o

NEW YORK — She’s the F to the E, R, G, the I, the E.

Fergie has officially changed her name: The singer born Stacy Ann Ferguson is now Fergie Duhamel.

The Grammy winner’s representative confirmed the name change Friday.

Fergie is one-fourth of the Black Eyed Peas.

She released her solo debut, “The Dutchess,” in 2006.

It launched five big hits, including “Fergalicious” and “Big Girls Don’t Cry.”