Grieving residents of Baton Rouge honored an appeal at the funeral of a black man killed by police to celebrate his life rather than demonstrate about his death.

At a three-hour service Friday, mourners paid their respects to 37-year-old Alton Sterling, whose July 5 shooting outside a convenience store began a tumultuous week in race relations.

"If you want to protest, please leave now," Gary Chambers, master of ceremonies for the funeral, said at the beginning that the event at Southern University.

A steady stream of mourners filed past Sterling's casket, which was adorned with music notes and a smiling photo of the man. Sterling was selling CDs outside the Triple S Food Mart store, as he had done for years, when he was killed by police responding to a call of a man threatening someone with a gun. Police have said they found a gun in Sterling's pocket.

Sterling's death was captured on cellphone video and circulated widely on the internet. His death, along with another fatal police shooting in Minnesota last week, sparked widespread protests. Then the fatal shooting of five police officers in Dallas by a black sniper heightened tensions even more.

The crowd included friends, family, activists and two senior advisers to President Barack Obama.

One mourner wore a T-shirt that said "No Justice, No Peace." Another carried a poster board sign saying: "Black America I'm Sorry!!"

Luminaries including the Rev. Jesse Jackson and close family members spoke about Sterling, his death and the police treatment of African-Americans.

"Wrong must be corrected and the wrong must be held accountable," the Rev. Al Sharpton said. "We have got to stop going from funeral to funeral."

Sharpton called for more accountability for police officers who kill African-Americans and reeled off a list of high-profile police shootings that have angered many in the black community: "We have an inferior judicial system that does not protect all of its citizens equally."

Sterling leaves behind five children, including his 15-year-old son, Cameron, who participated in a televised town hall with Obama on Thursday.

One of the biggest rounds of applause from the crowd of a couple thousand people came for Abdullah Muflahi, who owns the Triple S. Muflahi said Sterling wasn't just a man who sold CDs in front of his store.

"He showed me a lot of love. He looked out for me. He was friendly. He was welcoming. He was truly the meaning of southern hospitality," Muflahi said. "We're going to have an empty spot in front of the store."

Darrell Jupiter, a landscaper, said his best friend was nicknamed "Dweeb." They fished and played chess together.

"I have a big chunk missing. I'm lost," said Jupiter, who had a tattoo on his arm with the words "RIP Alton."

Sterling's death heightened tensions in Baton Rouge, where about 200 protesters were arrested over the weekend, but the city remained calm Friday night. East Baton Rouge Parish District Attorney Hillar Moore said his office reviewed initial police reports on 185 arrests between July 8-11 and determined it will not prosecute roughly 100 of those cases.

Moore said they involve protesters who were arrested only on misdemeanor charges of obstruction of a roadway or public passage. DeRay Mckesson, a prominent Black Lives Matter activist, was among them. Moore said his office is reviewing the rest of the arrests, which include allegations such as resisting arrest, carrying guns or some "act of violence."

Meanwhile, a man involved in what police have described as a credible threat to harm police officers made his initial appearance in federal court Friday. Police arrested Malik Bridgewater, 20, and three other suspects on theft and burglary charges after eight handguns were stolen from a pawn shop.

State and local law enforcement officials told reporters Tuesday that the stolen guns were part of a credible threat to harm police officers.

One of the suspects said they did so to harm officers; Bridgewater told investigators his motivation was to sell stolen items for cash, an agent from the Bureau of Alcohol, Tobacco, Firearms and Explosives wrote in an affidavit filed Thursday in federal court.

Baton Rouge Police Chief Carl Dabadie said threats like that justified an increased show of force at the demonstrations, as officers donned riot gear after starting with a mostly reserved, low profile. The American Civil Liberties Union of Louisiana and other groups filed a lawsuit this week over the treatment of protesters bypolice.

Bridgewater didn't enter a plea Friday to a firearms theft charge. He has been held without bond at a Baton Rouge jail because his bond for a 2015 criminal charge was revoked after his July 10 arrest.