A man was fatally shot by San Pablo police Wednesday in North Richmond after he appeared to be playing with a handgun in a menacing fashion outside some businesses — but the gun turned out not to be real.

The incident unfolded after an employee at Evergreen Produce, at Rumrill Boulevard and Market Avenue in North Richmond, called in a report of a man acting strangely in the parking lot, and appearing to cock a handgun repeatedly. As store employee Moad Harvi tells KTVU, "He was drunk. He was going through several emotions. The guy didn’t look like he was all there."

Harvi goes on to say that employees saw the man wandering around with the real-looking handgun, repeatedly removing the clip from it, and cocking the weapon.

Police arrived at the scene at 2:27 p.m., but moments earlier, the suspect had driven off in a red pickup truck, appearing to drive erratically and "swerving around vehicles in traffic," as Bay Area News Group reports. Police drove in the direction the man drove in, and found the truck three blocks away. They conducted what the San Pablo Police Department calls a "high-risk traffic stop" near the intersection of Market Avenue and Fred Jackson Way, and interacted with the man, who appeared to be bleeding from one hand. Officer also saw the replica gun in his right hand, which they said appeared real.

San Pablo Police Capt. Brian Bubar tells KTVU that the suspect refused to comply with officers' orders, but "eventually he did exit the vehicle holding an airsoft gun that looked exactly like a real firearm."

Bubar explained that, according to officers, the man continued toying with the gun and began to "mimic manipulating its slide." He then allegedly raised the gun close to his chest and turned toward the officers, at which point four officers fired on the man, and he fell.

Life-saving measures were unsuccessful, and the man died. He's been identified only as a 45-year-old resident of San Pablo.

Agents from the Department of Justice are reportedly investigating the shooting, along with others. All four officers have been placed on administrative leave.

It's unclear whether body-worn camera footage of the incident exists.

"Any time officers are involved in an incident like this it’s a tragedy and it’s unfortunate," Bubar said, speaking to the media. "And we will be working with the sheriff’s office and the Department of Justice to find out exactly what happened out there and why the subject did what he did to cause officers to react to his actions."