San Bernardino Police gunned down what's been described as a homeless man, who they say waved what might have been a handgun at them ... but it's not clear if he was actually armed.

The shooting occurred Saturday night at a gas station, where cops were responding to reports of a man brandishing a gun on the premises. When they showed up, cops say the guy was still carrying what appeared to them to be a firearm, and refused to put it down.

In bystander video, you can hear the officers giving the order ... and seconds later, they fire multiple rounds. The man was taken to a hospital and later pronounced dead. It's unclear what made the cops shoot, but SBPD released an image seemingly hinting at the reason.

San Bernardino Police Department

They put up this photo, which they say shows the suspect pointing what was perceived as a possible weapon at the officers. Interestingly, though, SBPD has not yet confirmed if a gun was in fact found.

Witnesses on scene told the L.A. Times they'd seen the guy there earlier in the day rummaging through trash cans and panhandling. A cashier at the Circle K across the street says she believes the police mistook a flashlight he had as a gun, adding he was harmless.

The investigation is ongoing, but considering the boiling point we've reached with officer-involved shootings[1] lately ... people are giving this a much-deserved hard look.

Read more from our friends at TMZ