EL CAJON, Calif. – In a turnabout, police here Friday decided to release two videos, taken by a taco-stand employee and a customer, showing the minutes leading to the fatal shooting by police of an unarmed black man.

Police on Tuesday night had released a still photo taken from a video showing the police killing hours earlier of Alfred Olango, 38, an immigrant from Uganda. But backed by the district attorney, the police chief had refused until Friday to release the full video.

The fuller release was made to try to avoid a repeat of the violence that erupted at the Thursday night protest march on a downtown street in this suburb east of San Diego. Five men were arrested after the rally of 50 to 75 turned violent, with car windows broken, bottles thrown at police and a rider pulled from his motorcycle.

Police used “pepper balls” and flash-bang grenades to disperse the crowd after the protest was declared an unlawful assembly. Four of the men arrested were charged with failure to disperse and one other for assault.

Friday night, a crowd of more than 100 protesters gathered at the same intersection where Thursday’s melee broke out. By nearly 9 p.m., there had not been a repeat of that violence but El Cajon police were prepared. The police department took to social media to warn  motorists to stay away from the intersection because of the growing crowd and “the possibility of police activity.”

Meanwhile, with several marches planned for Saturday, some businesses are planning to close early.

The videos released Friday included one taken by a taco-stand employee that is 1 minute and 37 seconds in duration. A second one by a customer is only a few seconds. Both were given voluntarily to police, officials said.

Both videos show two El Cajon officers closing in on Olango and one officer firing his gun. The video taken by the taco-stand customer has audio of a woman screaming.

The two officers were not wearing body cameras. They were responding to calls from Olango’s sister and other witnesses that Olango was acting erratically.

The longer of the videos shows Olango starting to walk away from one of the officers, then turning, walking several steps and assuming what police have called a “shooter’s stance.”

A protester watching the video on television said, “they trapped him like an animal.”

The decision to release the videos was made collectively by the city’s mayor, police chief, county sheriff, the district attorney, the area’s county supervisor and the chiefs of the police departments in San Diego, Chula Vista and Escondido, officials said.

The investigation into the shooting is continuing, El Cajon Police Chief Jeff Davis told reporters at a news conference. Also at the news conference was Andre Branch, president of the San Diego branch of the NAACP.

“Full disclosure to the public builds trust and shows respect,” Branch said.

San Diego County District Attorney Bonnie Dumanis said the videos are only part of the investigation. Dumanis agreed with the police decision to release the videos early, in a deviation from the standard policy of waiting until the full investigation is complete.

“I think it’s the right thing to do to ensure public safety,” she said of the decision to release the videos. She said any decision on whether or not to file charges is a “long way” away.

Protesters were not allowed at the news conference.

Asked why he released the still photo Tuesday night, Davis said, “We felt that the aggression of some of the protesters made it necessary to release some information.”

The photo purported to show Olango in a “shooter’s stance” and pointing a metallic, cylindrical object at one of the officers. The object proved to be a vaping device.

Davis declined to say whether the two officers had yet been interviewed by the homicide squad. He also declined to say whether Olango’s family had been interviewed. In response to a question, Davis said one caller had told the police dispatcher that Olango did not appear to have a gun.

Local ministers have repeatedly called for protests to remain peaceful. The call was echoed by Olango’s mother at a tearful news conference Thursday afternoon, and by Mayor Bill Wells. A prayer vigil outside El Cajon Police Department headquarters was set for Friday.

A rally demanding release of the video and the shift of the investigation to the Justice Department is set for Saturday afternoon. Protesters say the still photo provides only a limited view of the shooting and may be an effort by officials to cover up misconduct by police.

Olango, 38, arrived in the United States as a refugee with his family in 1991, according to a statement released by U.S. Immigration and Customs Enforcement.

An immigration judge ordered him deported in 2002 after he was convicted of transporting and selling drugs. An immigration judge renewed that order in 2009, when Olango left prison after serving a sentence for being a felon in possession of a firearm.

In both instances, Uganda refused to issue travel documents that would have permitted Olango to return to his homeland, according to a statement issued by ICE. Olango and his family had fled Uganda for fear of becoming victims of political violence, according to court documents.

The immigration system was required to release Olango from custody in compliance with a U.S. Supreme Court ruling that immigrants ordered deported cannot be held in custody indefinitely if their native country refuses to allow them to return, officials said.

After being released from federal custody, Olango was ordered to appear regularly before officials of the customs agency. He followed that requirement for several years but stopped reporting in February 2015 and “had not been encountered by the agency since,” according to the statement.

On Tuesday afternoon, the two El Cajon officers confronted Olango in a strip-mall parking lot after police received a call from his sister saying that he was acting erratically. According to police, Olango refused their commands and reached into his pocket for a metallic-looking object and then assumed a “shooting stance,” aiming the device at an officer.

That officer fired his service weapon, fatally striking Olango. The other officer fired a stun gun.

His sister watched in horror as her brother was shot.

“I told the police — please don’t shoot him, he’s sick, he’s mentally sick,” she told reporters later. “I didn’t call the officers to come and kill my brother in front of me.”

Olango, who worked as a cook at a Hooters restaurant, had several run-ins with local police, including allegations of drunken driving and domestic violence.

Olango’s tangled immigration and criminal background has added a level of complexity to the potential political fallout from his shooting. Olango’s supporters say his immigration status has no bearing on the shooting and is an attempt by officials to distract the public from the overriding issue of police conduct toward black residents.

At the news conference Thursday, Olango’s mother, Pamela Benge, said she feels the pain of other mothers who have had sons killed recently by police.

“We need justice,” she said. “This kind of thing needs to stop.”

She said her son was a “good, loving young man” who adored soccer, his family and particularly his daughter.

She denied that he was mentally ill. He had become distraught over the recent death of a friend, she said.

“His mind was not communicating,” Benge said. “A mental breakdown is not easy to control.”

The Rev. Shane Harris, president of the National Action Network, said Thursday that the killing was “representative of what we’ve seen around the country.”

Olango “was attacked and not given the opportunity to live,” he said. “Alfred was not mentally ill nor was he unstable.”

The incident followed controversial police shootings in several locations in the United States. That increased the anger of protesters in El Cajon, a blue-collar suburb with a large immigrant population.

Olango’s family has contacted a San Diego lawyer, Dan Gilleon, who once sued one of the officers involved over a sexual-harassment allegation filed by a female colleague; the city settled the case, and the officer, a 21-year veteran, was demoted. Gilleon says the officer should not be on the police force.

The shooting fit a pattern found during a study by Dumanis’s office in 2014 of several hundred police shootings in San Diego County between 1993 and 2012. The study found that in 45 percent of cases, the shooting occurred “immediately” after the officer arrived and that in most cases, two officers were on the scene when the shooting occurred.

Olango’s shooting happened within a minute of the officer arriving, police said.

The shooting also highlights a concern by police throughout the country: how to deal with people with mental-health issues. (The nature of Olango’s mental health has not been officially clarified.)

The El Cajon police, according to Wells, the mayor, have officers with specific training in dealing with the mentally ill, but those officers were at another call when the two officers confronted Olango. He said 30 percent of police time in El Cajon involves dealing with people with mental-health issues.

“We have to do better with the mentally ill,” Dumanis said Thursday.

Mental-health issues are a factor in about a quarter of fatal police shootings, according to a Washington Post database tracking such incidents nationwide. Olango was at least the 716th person fatally shot by police this year. In 2016, 172 of those who have died had mental-health issues.

Experts say such shootings highlight the issue of how often police are called to respond to people in mental or emotional crisis — and whether police training adequately prepares them to handle those calls.

In most cases last year in which people with reported mental illness were fatally shot by police, police were responding because relatives or bystanders were worried about the person behaving erratically; last year, this included dozens of explicitly suicidal people.

This post has been updated.