SAN JOSE — A man shot and killed by a security guard while reportedly trying to rob the Walgreens in downtown San Jose on Monday night was fatally wounded during a struggle over the guard’s gun, according to police.

The circumstances of the shooting near the busy intersection of Santa Clara and First streets were revealed by investigators Thursday in response to inquiries from this news organization.

Police also confirmed that the shooting is being classified as the city’s 32nd homicide of the year, but that there was no immediate indication that the guard is facing any criminal liability. The case was expected to be presented to the Santa Clara County District Attorney’s Office for further review about whether the shooting was justified.

Officers raced to the drugstore after getting an 8:23 p.m. Monday report of a shooting there, and found 38-year-old Maurice Charles suffering from at least one gunshot wound.

Charles died the next day at a hospital. He was formally identified Thursday, and the coroner’s office did not have a listed city of residence for him.

An investigation found that Charles was in the midst of assaulting a store employee when he encountered the guard, who worked for a third-party company contracted to provide security at the Walgreens.

“During an attempted robbery, he threatened and assaulted the clerk,” Sgt. Enrique Garcia said. “When the guard intervened, (Charles) attempted to assault him and take his handgun.”

The ensuing struggled ended with Charles being shot, Garcia said.

The case is being investigated by the SJPD homicide unit. Police confirmed the guard was properly licensed by the state to work as a security guard and carry a firearm. To lawfully carry a weapon, security guards in California must obtain a special permit from the state Bureau of Security and Investigative Services.

It does not appear that Charles was armed. Police said the guard who fired his weapon cooperated with investigators.

A reporter who visited the Walgreens this week was told that the store would not be commenting on the shooting.

The death marks the 32nd homicide of the year in San Jose, which had reported 46 homicides at the same point in 2016.

Anyone with information about the case can contact SJPD homicide Det. Sgt. Mike Montonye or Det. Jason Tanner at 408-277-5283 or leave a tip with Silicon Valley Crime Stoppers at 408-947-STOP or svcrimestoppers.org.