Charges are expected to be dropped against a former mayoral candidate accused of spray-painting the words Black Power Matters on a statue of former Mayor Frank L. Rizzo near City Hall last year, if he completes 50 hours of community service.

Under an agreement between the prosecution and defense, all four misdemeanor charges against Wali Rahman, 40, of Germantown, will be withdrawn despite an earlier indication of a plea deal from the District Attorney's Office.

Assistant District Attorney Noel Walton told Municipal Court Judge Thomas Gehret during a brief proceeding Wednesday that both sides had reached a "Rule 546 agreement" in which Rahman would complete the community service.

Michael Coard, Rahman's attorney, said afterward that the community service would be done with the Pennsylvania Prison Society, which has its office on South Broad Street in Center City. He declined to comment on the case, or on why the prison society was chosen for the service.

Rahman, who also uses the name Diop Olugbala, was accused of spray-painting the Rizzo statue about 11 p.m. Aug. 17. Video of the act recorded by Fox29 cameras was used to identify Rahman.

He also was accused of writing "The Black community should be their own Police" on the steps beneath the statue in front of the Municipal Services Building.

He faced misdemeanor charges of criminal mischief, possession of an instrument of crime, institutional vandalism, and intentional desecration.

On March 16, Walton told Municipal Court Judge William Austin Meehan Jr. that the charges against Rahman would be resolved with a plea to a summary offense of criminal mischief, signaling that the three other charges would be dropped.

That had displeased Meehan, who told the prosecutor that day: "Why don't you just give a free pass to everybody in town?" Meehan didn't mention District Attorney Larry Krasner, but was clearly referring to the new DA's goal of seeking lighter sentences.

In court Wednesday, Gehret made no comment about the case, and the allegations in the case were not discussed.

After the hearing, Rahman said he had spray-painted Black Power Matters on the statue because "Frank Rizzo is one of many icons or symbols of the repression … against the black community" in the city. He expressed satisfaction with the outcome in his case.

A May 3 hearing date was scheduled for the status of Rahman's community service, which he is expected to complete in 30 days. If he does so, the DA's Office is expected to drop the four charges.

Rizzo's statue has stoked heated debateoften along racial lines. Critics of the former mayor have demanded it be removed, saying he targeted communities of color. His supporters say he was a hero who made the city safer.

>> READ MORE: Mural Arts gets more than 1,000 responses on Rizzo mural's future

The Kenney administration in November announced it would move the bronze statue from the spot where it has stood for nearly two decades. That has not happened.

Rizzo served as police commissioner from 1967 to 1971 and as mayor from 1972 to 1980. He died of a heart attack at age 70 in July 1991.

In 2011, Rahman ran for mayor of Philadelphia. He got 3.6 percent of the vote.