BAKERSFIELD, Calif. (KGET) — Surveillance video shows one man hand a gun to another just before a deadly shooting outside a smoke shop and casino in Oildale, according to sheriff’s reports.

Omar Perez-Rodriguez, the accused shooter, and Fabian Huerta, who investigators say gave him the handgun, are charged with second-degree murder in the death of 25-year-old Brian Ray Smith.

On the night of May 20, Smith was found shot on Lincoln Avenue near Oildale Drive. He was pronounced dead at the scene.

A review of surveillance footage captured Smith and another person arriving at the location in a white pickup. The truck did a doughnut in the intersection and hit the curb before parking, according to the court documents.

Perez-Rodriguez, 20, and Huerta walk out of the casino and watch the truck’s occupants, the reports say.

The names of everyone except the suspects are redacted from the documents. It’s unclear if Smith drove the truck or was a passenger.

The video shows what appears to be a disagreement between the suspects and Smith and the other person who arrived in the truck, according to the documents. Smith and the other person return to the truck.

Huerta goes to his car and then argues with the truck’s occupants, the reports say. He walks away and meets Perez-Rodriguez at the casino door.

Detectives who reviewed the video wrote “you can see Huerta give Perez-Rodriguez a black handgun,” and the two men walk over and continue arguing with Smith and the other person.

One of the truck’s occupants — it’s unclear from the documents if it’s Smith — grabs Huerta’s neck and appears to hit him, according to the documents. Huerta and Perez-Rodriguez back away.

As he retreats, Perez-Rodriguez pulls a gun and fires a shot that appears to miss as one of the men tries to grab him, the reports say. Smith continues to chase him, according to the documents.

“A second shot is fired from Perez-Rodriguez, and (Smith) appears to go down,” the documents say. Perez-Rodriguez and Huerta run.

Perez-Rodriguez was arrested Sept. 6 and is due in court this week for a preliminary hearing. Huerta is not listed in custody.