SAN DIEGO — San Diego police released bodycam video Tuesday showing the moment an officer shot and killed an armed suspect while carrying out a search warrant at an apartment complex in the College Area.

The shooting occurred around 6:45 p.m. on Aug. 15 in the 6100 block of El Cajon Boulevard, according to SDPD. Detectives were attempting to contact a man who considered a person of interest in a shooting in Clairemont earlier this month.

The video released Tuesday begins with private dashcam footage of the initial incident, which occurred nearby the intersection of Ben Street and Beagle Street around 1:30 a.m. on Aug. 2.

In the video pulled from a parked car, two occupants in a white Tesla can be seen opening the car’s doors to shoot at another car. At least five shots can be heard before the two suspects got back into the Tesla, reversing the car out of sight of the dash cam.

Shortly after, officers located the Tesla in the alley behind the 7400 block of Armstrong Place, according to SDPD. Only one of the suspects, 33-year-old Benjamin Pickens, was with the vehicle when it was found. However, Pickens drove off, and officers lost sight of him.

He was later found walking nearby Mesa College campus, leading to a shooting involving police that left a K-9 named “Sir” and Pickens dead.

Through SDPD’s investigation, detectives later identified the second occupant in the Tesla as 31-year-old Xavier Benjamine Lacosta. Investigators obtained a search warrant for his apartment and a warrant for his arrest.

According to SDPD, officers set a perimeter around the apartment and attempted to contact Lacosta, giving verbal commands and warnings to come out with his hands up. Lt. Joseph Jarjura told FOX 5 that law enforcement also attempted to make phone calls into the residence.

In the bodycam video from Officer Gregory Simon, the commands given by police can be heard. Lacosta can then be seen opening his door of his apartment with a gun in his hand. Officers then yell at the suspect to drop the weapon, with Simon saying “I will shoot you.”

The footage shows Lacosta complying, placing the gun on the ground near his feet. Seconds later, however, he can be seen trying to reach for the gun, prompting Simon to fire off at least seven shots. The suspect then dropped to the ground.

According to SDPD after the incident, at least one of the rounds fired from the officer struck Lacosta. Life-saving measures were rendered, but he was ultimately pronounced dead on scene.

The firearm in the hand of the suspect was later identified as a ghost gun loaded with a single round, police said.

According to authorities, Simon has been on the force since 2016. The San Diego County Sheriff’s Department Homicide Unit will continue to investigate the shooting, which will then be reviewed by the San Diego County District Attorney’s Office to determine whether the officer bears any criminal liability.

A separate review of the incident will be conducted by the San Diego Commission on Police Practices to provide recommendations for any appropriate disciplinary measures.