Police released two videos Friday showing an officer fatally shooting an unarmed black man in a San Diego suburb and said they hoped showing the footage would ease escalating tensions.

The videos show the officer fired four times at close range almost immediately after Alfred Olango, 38, suddenly raised both hands to chest level and took what was described as a shooting stance.

The shots came less than a minute after police arrived at the scene in response to Olango's sister calling 911 and reporting he was acting erratically.

The videos were released after three nights of unruly and, at times, violent protests in El Cajon, and on the eve of a large demonstration organized by clergy and supporters of Olango's family, who had pressured authorities to show the footage of the fatal encounter. On Thursday night, an officer was struck in the head by a brick hurled by a protester.

"Our only concern at this point was community safety," El Cajon Police Chief Jeff Davis said. "We felt that the aggression of some — some — of the protesters was escalating to the point where it was necessary to release some information and truly, it was my hope to relieve some of that concern."

In addition to the videos, police showed the 4-inch electronic cigarette device Olango had in his hands when he was shot.

A lawyer for the family said they welcomed the release of the videos, but questioned the tactics used by Officer Richard Gonsalves. Olango had been reported to be mentally disturbed and unarmed and yet Gonsalves approached with his weapon out, Dan Gilleon said.

"It shows a cowboy with his gun drawn provoking a mentally disturbed person," Gilleon said.

The incident is the latest in a series of fatal shootings of black men that have roiled communities across the U.S. It came weeks after fatal shootings by police in Tulsa, Oklahoma, and Charlotte, North Carolina.

Olango, a Ugandan refugee who arrived in the U.S. as a boy, had a criminal record that included drug and weapon charges but no violence. His family described him as a loving father and a joyful, happy person.

His mother said he suffered a mental breakdown recently after the death of his best friend. On Tuesday, his sister called 911 and reported he was acting strangely and walking into traffic by a strip mall.

The longer of the two videos released by police came from a surveillance camera in the drive-thru of a restaurant. It is roughly a minute, has no sound and police blurred out the heads of everyone in it.

Olango is seen walking through the parking lot and then stopping suddenly as Gonsalves approached, his weapon drawn at his side.

Olango, his right hand in his pants pocket, moved side to side and backed up toward a white pickup truck.

As Gonsalves moved in from the front, a second officer, Josh McDaniel, got out of a cruiser and approached from the side.

In the second video, taken on a cellphone by a witness in the drive-thru, Olango's sister is seen approaching Gonsalves from behind and a woman can be heard screaming at Olango to put up his hands and telling police not to shoot.

Olango then bent over and assumed the shooting stance and Gonsalves quickly fired four shots at close-range. A woman shrieked loudly as Olango fell forward.

That night, as an angry crowd protested outside police headquarters, Davis released a single image from the video showing Olango with his hands clasped in front and in the shooting stance. Police said he had ignored repeated orders to show his hands.

Davis defended the release and said it was intended to de-escalate tensions and correct what he felt was "false narrative" that was developing. Some witnesses said Olango had his hands in the air and was begging not to be shot.

Olango's family and demonstrators demanded to see the full video, saying the single frame was selectively misleading to support the police version of events. They also questioned why it took them more than an hour to respond to three calls for help and then less than a minute to use deadly force.

Davis said the investigation was ongoing and he did not address whether officers acted appropriately in how they responded to the incident.

Andre Branch, president of NAACP Sam Diego, commended the city for releasing video.

"Full disclosure to the public builds trust and it demonstrates respect," Branch said.