Condemning the fatal police shooting of Alton Sterling, the president of the NAACP on Friday called on Baton Rouge residents to demand an end to racial profiling, saying, “White skin is not a cloth of respectability and credibility.”

Cornell W. Brooks, the president of the NAACP, delivered an impassioned address at City Hall three days after Sterling’s death, urging a spirited but peaceful crowd of demonstrators to turn their grief into civic engagement.

“In the last century, we had to worry about lynch ropes. In this century, we have to worry about badges and guns,” Brooks said. “Lynching at the hands of somebody wearing a white sheet in the last century was worrisome and fearful, but a lynching in the 21st century by someone wearing a blue uniform is intolerable and unconscionable and something we can and will bring to an end.”

Brooks’ remarks highlighted a well-attended rally in which a parade of public officials and community leaders called for reforms within the Baton Rouge Police Department. Several speakers encouraged demonstrators to boycott local malls and even Wal-Mart until the authorities decide to pursue murder charges against the two officers involved in Sterling’s shooting.

Sterling was shot to death early Tuesday during a run-in with police officers in the parking lot of the Triple S Food Mart on North Foster Drive. The shooting, which was captured on cellphone videos, touched off days of local protests, prayer services and demonstrations, which have remained mostly peaceful. The U.S. Justice Department opened a civil rights inquiry into the shooting this week amid national outrage at the cellphone footage.

Dozens of people attended the rally in downtown Baton Rouge on Friday, held half a day after five police officers were gunned down in Dallas at an event organized to protest Sterling’s death and that of Philando Castile, another black man fatally shot by police this week in Minnesota. Participants at Baton Rouge City Hall chanted, “No justice, no peace,” and waved placards that read “Black Lives Matter” and “Stand Against Cruelty.”

State Rep. Patricia Smith implored the crowd to remain nonviolent. “We have to be the model for when a city faces tragedy,” she said. In a statement released earlier in the day, Quinyetta McMillon, the mother of Alton Sterling’s son Cameron Sterling, denounced the killing of the Dallas officers as “reprehensible acts of violence.”

“Regardless of how angry or upset people may be, resorting to this kind of sickening violence should never happen and simply cannot be tolerated,” McMillon said. She added that members of law enforcement have a difficult job and “the vast majority conduct themselves honorably as they protect and serve our communities.”

Brooks, the NAACP president, said he grieves for the families of the Dallas officers. But he also said his organization is mourning the loss of the more than 500 people fatally shot by the police so far this year.

“Unless black lives matter, all lives can’t matter,” Brooks said. “We understand that our communities deserve respect. Our people deserve respect.”

Erika McConduit-Diggs, president of the Urban League of Greater New Orleans, called for major reforms within the Baton Rouge Police Department, including an overhaul in recruitment strategies. The Police Department, she noted, remains disproportionately white — about 67 percent — even as it polices a majority-black city.

“We need a major shift in public policy to bring about sustainable change,” McConduit-Diggs said. “We are calling for the establishment of an independent police monitor’s office, a civilian police oversight agency that ensures that investigations of police misconduct are executed appropriately, fairly and in a timely manner.”

The demonstration attracted activists and onlookers of all ages. But East Baton Rouge Parish Metro Councilman John Delgado bemoaned a noticeable lack of diversity in the crowd, particularly the dearth of Republicans. “We should all be here,” said Delgado, a Republican candidate for the fall election to select the next parish mayor-president. “We should all be here together.”

Police closed roads downtown in the area of City Hall and the parish courthouse. Officers at the scene confirmed the closures were due to planned demonstrations. Several public offices, including the clerk of court and tax assessor, closed early. The parish assessor, Brian Wilson, said the decision was precautionary, in light of recent events in other cities. The Clerk’s Office posted a sign in its windows citing “emergency conditions” for its noon closure.

Anthony Smith, a Baton Rouge resident, watched a group of demonstrators Friday morning in front of the 19th Judicial District Courthouse, a group that chanted, “We want justice,” and waved signs that read “Jail the bad cops!!!” Smith said he believes criticism of the police reached a “boiling point” this week in part because so many officers around the country have not faced charges in the aftermath of controversial fatal shootings.

“I believe in fairness and justice,” Smith said. “I believe every race of people should be treated the same.”

Johnnie Domino, a local filmmaker, said he attended the rally because “it’s time for people to take a stand.” He said he believes the police overreacted by shooting Sterling, though he allowed that the cellphone videos of the incident did not capture the entire encounter. Asked whether he had considered staying home Friday after the slaying of the Dallas officers, he said the bloodshed in Texas on Thursday and Sterling’s death might have been averted “if we would have come out earlier.”

“If you have a hole in your roof and you don’t fix the leak, it will end up destroying the entire inside of your house,” Domino said. “You’ve got to fix these leaks. You’ve got to fix these situations that keep getting swept under the rug.”

Advocate staff writer Steve Hardy contributed to this report. Follow Jim Mustian on Twitter, @JimMustian