SAN JOSE (CBS SF) — A man who was shot and killed by a plainclothes San Jose police officer after pointing a gun at the officer was being surveilled at the time after being let out on bail from an armed robbery arrest, police said Wednesday.

San Jose police held a press conference Wednesday morning to provide additional details of what led up to the fatal shooting Monday night of Demetrius Stanley on the 1100 Block of Tofts Drive in the Berryessa neighborhood in north San Jose. Surveillance video of the moments leading up to the shooting was also released.

READ MORE: COVID: Oakland Unified Sets January Deadline For Students 12 And Up To Be Fully Vaccinated

Raw Video: San Jose Police Press Conference – Update On Officer-Involved Shooting

Police Chief Anthony Mata said plainclothes officers were monitoring Stanley at his home after he had been released on bail in an armed robbery and assault with a deadly weapon case in March. Mata said Stanley had menaced a juvenile driver following a road rage incident using a handgun with a laser pointer, and stole a replica handgun from the juvenile driver’s car.

After further investigation of that incident, the Santa Clara County District Attorney’s Office issued a new arrest warrant against Stanley which included gun possession by a prohibited person based on a prior domestic violence incident, Mata said.

Enhanced image from surveillance video showing moments before fatal officer-involved shooting in San Jose, May 31, 2021. (SJPD)

On the night of the shooting, two plainclothes police officers were conducting undercover surveillance of Stanley’s outside his home. At one point, one of the officers was in an unmarked car and the other was on foot when Stanley emerged from the home with a gun in his hand and began moving toward the officers, according to Mata.

“The officer heard the sound of a handgun being racked and loaded. The officer then ran away from Stanley as fast as he could in order to avoid a confrontation,” Mata said.

Surveillance video shows Stanley then stopped and tucked the handgun into the waistband of his shorts and started walking back towards his home, passing the unmarked police vehicle with the second plainclothes officer inside. He stopped again and walked back to the unmarked vehicle.

“Stanley pulled out his gun using one hand and opened the officer’s driver’s door with the other. Evidence shows Stanley pointed the handgun directly at the officer,” Mata said. “Fearing for his life, the officer fired his weapon at Stanley.”

The officer who shot Stanley, a 14-year veteran, was not immediately identified because of his undercover assignments, and Mata said he was placed on administrative leave.

Family members said police detained and questioned family members at the home while ransacking the home looking for evidence, without telling them at first that Stanley had been shot and killed.

READ MORE: Fantasy Football Start Or Sit Week 8: Can Kirk Cousins Put Up Points On The Cowboys Defense?

“A search warrant was obtained for the house, so a search was conducted at the residence,” said Mata. “It’s generally a good practice, a good idea not to traumatize the family at whatever crime scene we have.”

Family members also said Stanley was protecting his family inside the house and didn’t know who the plainclothes officers were. Mata said the officers never announced themselves because they were not there to arrest Stanley or have any contact with him, and did not have time to announce themselves before the shooting happened.

“We didn’t intend for these circumstances to occur,” said Mata. “When confronted like the officers were confronted, they made a decision.”

As to whether Stanley may have been justified in coming out of his home to ward off unknown people who were in his neighborhood or following him, Mata said Stanley’s decision to confront them with a gun prompted the response from the officer.

“I can see where if someone sees something out of the ordinary in their neighborhood, but to confront someone with a firearm, I think whether they’re officers or not, I think that is something that is dangerous to confront someone with a firearm,” said Mata.

The latest deadly shooting prompted a protest that shut down a freeway in San Jose Tuesday night, with protesters blocking off northbound Highway 87, marching onto Taylor Street and on to police headquarters.

Several branches of investigating units are looking at the incident, such as the department’s internal affairs and the Santa Clara County DA’s office.

It was the second fatal officer-involved shooting of the year in San Jose.

In January, police shot and killed 27-year-old David Tovar Jr. in the courtyard of an apartment complex in the city’s east foothills in January.

He had been sought by authorities in connection with a homicide in Gilroy and other violent attacks in South Santa Clara County.

MORE NEWS: UPDATE: High-Speed Stolen RV Pursuit Ends In Horrific San Ramon Crash