It happened amid a public debate over how the police use lethal force in encounters with unarmed civilians, especially African-Americans, and the subsequent absence of charges or convictions for officers involved. The refrain “Black lives matter” became the rallying cry of protests over the deaths of Eric Garner in Staten Island and Michael Brown of Ferguson, Mo., and others who died at the hands of police officers who were later cleared of criminal wrongdoing.

On Friday night, protesters gathered at the scene around a police blockade, drumming and chanting, “Black lives matter.” On Saturday, people gathered for a rally at a downtown building that houses the Madison Police Department’s Central District and marched to the street where the shooting happened.

Their protests coincided with the 50th anniversary commemoration of the civil rights march from Selma, Ala., to Montgomery, the state capital. Representative John Lewis of Georgia, who was in the 1965 march and introduced President Obama there on Saturday, urged others to “get out there and push and pull until we redeem the soul of America.”

The police said that the protests in Madison had been peaceful and that there were no arrests connected to the demonstrations.

Mayor Paul Soglin of Madison said that he met with the man’s relatives on Friday and that the shooting had caused a great deal of sadness and anger for the family and the larger community.

“The parents have encountered the worst imaginable outcome of anything in life, which is to lose a child,” he said. “They’re angry. They want answers.”

Mr. Soglin said that as far as he could tell, the man was “a nonviolent kid,” but he would not confirm his name. “He was a teenager,” he said. “He was congenial, had a lot of friends. He certainly wasn’t a kid that one would worry about as we do with some kids with gang affiliations. There is none of that, as far as I know.”