PHILADELPHIA — The mayor imposed a curfew on Philadelphia on Wednesday and called in the National Guard following successive nights of rioting after police shot to death a Black man whose family said he was in the midst of a mental health crisis.

The moves by Philadelphia Mayor Jim Kenney (D) were aimed at curbing incidents of looting, fires and dozens of minor injuries to officers that officials said were caused by people taking advantage of the backlash against the shooting of Walter Wallace Jr. to commit crime. The unrest disrupted peaceful protests against police violence, including one that was called off Wednesday night in response to the imposed curfew starting 9 p.m.

“The looting that has taken place ... is distressing to say the least, and it is unacceptable,” Kenney said in an afternoon news conference. Those carrying out mayhem, he added, are “doing a great disservice to the many others who want to exercise their First Amendment rights by protesting.”

Thousands of people have marched through the city in recent days, demanding justice for Wallace, who was 27, and an end to the discriminatory policing that they say has targeted Black residents.

“We’re out here to decimate the system that’s meant to decimate us,” said Mikal Woods, a 24-year-old Black man who lives in the West Philadelphia neighborhood that has been rocked by the shooting and subsequent protests. “They shot that man to kill him. Fourteen times.”

The order to shut down the city overnight came as Philadelphia’s police union demanded that authorities release information about the Monday afternoon shooting that has so far been kept out of public view. “Release what you have. Support your officers, back your officers and let’s get a handle on this thing,” said union president John McNesby, noting that Wallace was armed with a knife when he was shot.

Police Commissioner Danielle Outlaw declined, at least for now. She said officers’ body-cam footage and the audio from a 911 call would be released publicly, but not before Wallace’s family has the opportunity to review them. Outlaw said that would happen “in the near future,” but didn’t specify when.

The unrest in Pennsylvania’s largest city has unfolded in the waning days of a presidential race in which racial justice and law enforcement are both high on the agenda and the state could tip the balance. President Trump and former vice president Joe Biden continued on Wednesday to offer markedly different responses to Wallace’s shooting, and its aftermath.

Biden has expressed sympathy for the Wallace family, vowed to prioritize reforms in the way communities respond to mental health crises and condemned destructive behavior, while expressing solidarity with protesters. On Wednesday, the Democratic nominee noted that Wallace’s family has urged calm and an end to the violence.

“I think to be able to protest is totally legitimate, totally reasonable,” Biden told reporters after voting in Delaware. “But there’s no excuse for the looting.”

Trump has not mentioned Wallace by name, only referring to his death obliquely, calling it “a terrible event.”

But he has repeatedly castigated Democratic officials in Philadelphia and Pennsylvania, blaming them for the disorder Monday and Tuesday nights.

“What I’m witnessing is terrible,” Trump said. “The mayor, or whoever it is, is allowing people to riot and loot and not stop them. It’s also just a horrible thing.”

The president said federal resources would be available “within one hour” if local officials asked.

Kenney on Wednesday said Trump “brings no positive help to any situation.” The mayor’s request for National Guard troops was approved by Pennsylvania Gov. Tom Wolf (D), who also on Wednesday signed an emergency proclamation authorizing state resources to be sent to the city.

Officials said the National Guard would be on the streets by Friday night, and that the forces would be assigned to protect buildings and other key sites.

Outlaw, the police commissioner, acknowledged Wednesday that the city had been caught off guard by the scale of the rioting and by the location. Much of Tuesday night’s looting took place at big-box stores in the city’s Port Richmond section, an area that she said had not been on the department’s radar as a potential target. She said as many as 1,000 people were involved, having converged on the site after probably having received word via a group text.

“We had zero information to warn us of this,” Outlaw said.

Police on Tuesday night made 81 arrests, mostly for burglary. Nearly two dozen officers were injured, most with cuts and bruises from thrown objects. One was hospitalized Monday night with a broken leg after being struck by a truck, the police commissioner said.

“They’re bringing bricks in backpacks,” she said. “We’re not talking about little stones or pebbles.”

Wallace died Monday after two Philadelphia police officers shot him multiple times while responding to a call reporting a man with a knife. His family said he suffered from mental health issues, which his doctors had been treating with medication. A lawyer for the family told the Associated Press on Tuesday that Wallace’s relatives had called for an ambulance to take him to the hospital for medical care, but police showed up instead.

A video of the fatal encounter raised questions about why officers approached a man in an apparent mental health crisis with guns drawn and why they did not first try to subdue Wallace with a less lethal weapon. Authorities have said the officers were not armed with Tasers due to budget restrictions that have prevented widespread distribution of the devices.

Wallace is among at least 806 people fatally shot by police so far this year as of Wednesday, according to The Washington Post’s database tracking such shootings. Mental health issues have been a consistent element of these fatal shootings since The Post began its database in 2015. This year, 1 in 5 fatal shootings by police have involved people who were suffering from mental health issues or in the midst of a crisis.

This recurring pattern has prompted questions about whether police have the training needed to respond to such issues and spurred calls for officials to find different ways to respond.

Officials have pleaded for patience as they investigate what happened when Wallace was killed. Authorities have released few details about the episode, saying they were still trying to understand what the officers knew when they encountered him and why they opened fire. Cellphone video shows Wallace advancing toward the officers when shots ring out.

On Tuesday, officers took a more aggressive tack than they had on Monday, filling the streets with lines of riot police blocking the path of demonstrators, who had gathered at Malcolm X Park in West Philadelphia and wound their way through residential streets.

“Who killed Walter Wallace?” protesters chanted. “No justice, no peace! No racist police!”

As protesters marched, a truck lit up with photos of Wallace rolled through the streets, a neon message displayed on its rear doors reading: “I don’t hate cops. I hate that cops don’t speak against the killing of Blacks by cops.”

Pascale Vallee, a 34-year-old graduate student studying public health, said the killing of Wallace was “shameful.” She said she saw his death as “the intersection of so many ‘-isms’: racism, ableism.”

“He needed social supports,” she added, “not bullets.”

As the protests spread out from West Philadelphia into several other parts of the city and grew increasingly volatile late Tuesday, the Philadelphia Police Department issued a request for residents near the unrest to stay home and remain indoors.

By 2:30 a.m. Wednesday, the protests near 52nd Street were broken up by police, who detained and arrested dozens as they marched toward angry crowds. Officers chanted, “Move, back! Move, back!” and repelled rocks, bricks, kicks and shoves with scuffed plastic shields and batons.

Walter Wallace Sr., the father of the man killed Monday, denounced the looting Tuesday evening. “They’re not helping my family; they’re showing disrespect,” Wallace Sr. told the Philadelphia Inquirer. “Stop this violence and chaos. People have businesses. We all got to eat.”

It was a message echoed late Wednesday afternoon by Bonitto Redley, 69, owner of Hill’s Barber Shop, as he prepared for the curfew to kick in.

“The people who are destroying property are not protesters,” said Redley, whose business has been a fixture in the neighborhood for more than 40 years. “They’re not worried about Wallace being dead. They’re not worried about his family. They’re robbers, losers.”

Correction: An earlier version of this story misstated the role of the National Guard in responding to the protests. While Pennsylvania Gov. Tom Wolf (D) had authorized the Guard to deploy, no troops had yet gone to Philadelphia as of Tuesday, according to the office of Mayor Jim Kenney (D).

Shepherd, Witte and Berman reported from Washington.