Anti-police-brutality protesters are not to blame for a lone Dallas gunman who killed five cops and injured seven others, activist-preacher Al Sharpton said Saturday.

Speaking at his weekly rally in Harlem, Sharpton said he mourns the cops’ deaths on Thursday — as well as those of two black men shot dead by other officers days earlier, Philando Castile in Minnesota and Alton Sterling in Louisiana.

“I stand, and many others stand and say that what this man did in Dallas was wrong and reprehensible,” Sharpton said, “but I want to see one good cop stand up and say, ‘It’s time for cops to have to pay if they commit a crime!’ ”

Sharpton said the Dallas gunman, Micah Johnson, didn’t tipify those seeking to stop undue police violence against blacks and Latinos and pushing for the prosecutions of cops who use excessive force.

“Don’t distort our movement,” Sharpton said. “Don’t break the law and act like we’re being, in some way, provocative, to ask you to enforce the law.”

Sterling, 37, was shot dead by an officer in a videotaped struggle with two officers in Baton Rouge. Sterling had a gun in his pocket, but did not appear to brandish it during the confrontation.

advertisement | advertise on newsday

More than 1,600 miles away, police shot and killed Castile, 32, during a stop in Falcon Heights, south of St. Paul. Via Facebook, his girlfriend live-streamed the aftermath. Castile had a gun permit, was armed, and his girlfriend said he was reaching for identification when an officer opened fire.

Investigations into the killings are continuing.

In Dallas, authorities said Johnson told negotiators that he was angered by police killings of black men and had targeted whites. Police sent in a robot with a bomb to kill him after he refused to surrender.

Sharpton was joined at the rally Saturday by Gwen Carr, whose son Eric Garner of Staten Island was killed in 2014 by what the New York City medical examiner ruled was an NYPD chokehold during an arrest for selling loose cigarettes. She said she empathized with the families who have lost loved ones in the past week — including those of the slain officers.

“I can honestly say, I know what you’re feeling. I know what you’re going through, and I want to say, just try to be strong,” she said.

Carr said she can understand the injustice-fueled frustration that motivated the gunman in Dallas, but she said: “Shooting those innocent police officers — why kill the innocent? They’re not the ones that shot your loved ones.”

She added: “We don’t go down gunning down innocents. We are about peace.”