SAN BERNARDINO, Calif. (AP) — Police in Southern California shot and killed a man they believed was armed with a gun, authorities said Sunday.

Officers responded to a gas station convenience store in San Bernardino on Saturday night following a report of a man “waving around a handgun,” the city’s police department said in a statement.

“Patrol officers arrived and located a suspect matching the description, and the suspect was still carrying what appeared to be a black handgun in his hand. An officer-involved shooting occurred and the suspect was struck and was injured,” the statement said.

The man was taken to a hospital, where he was pronounced dead. Police said he was Hispanic, but the initial report they received described him as white. He was not immediately identified.

Cellphone video taken from a passing car and posted to YouTube captured officers pointing their weapons at a suspect near a gas pump and shouting for him to “drop the gun!” The vehicle rounds a corner and the camera shot is obstructed as a flurry of shots are heard.

The department posted on its Facebook page several frame grabs from videos at the scene. One from an officer’s body-worn camera shows a man with his arms extended pointing an object toward a parked police cruiser. It’s unclear if he’s holding a gun and police didn’t say if one was recovered.

Delina Miranda, who witnessed the incident, said she saw the man earlier rummaging through garbage cans with a flashlight.

Miranda, a cashier at a convenience store across the street, told the Los Angeles Times the man frequently panhandled in the area.