An unidentified inmate at the Montgomery County Jail in Dayton, Ohio, died Wednesday after he shot a security guard and then turned the gun on himself at the Miami Valley Hospital.

The incident happened while the inmate was at the hospital to receive medical treatment. He was initially admitted to the emergency department around 1 a.m. local time.

Around 9:45 a.m., the inmate managed to take the security guard’s gun and fired it, wounding the guard. The inmate eventually used the weapon on himself and died from a self-inflicted gunshot wound.

“The inmate was able to get the gun away from the armed security guard and shot the security guard and then shot himself in the parking lot behind the emergency room,” said Dayton Police Maj. Brian Johns.

“At this time the inmate is deceased from his gunshot wound that was self-inflicted.”

The inmate was being held at the jail on a probation violation. However, officials have not revealed what the inmate was treated for at the hospital.

The security guard was contracted by the Montgomery County Sheriff’s Office from a third-party company and was not a deputy.

Police are still gathering more details about the incident. They admitted they were not sure how the inmate was able to grab the security guard’s gun.

“We don’t know exactly how he was able to get ahold of the security guard’s gun,” Johns said. “We just know about 9:45 this morning, that’s when this actually happened.”

During the time in which officials conducted an investigation, emergency services were rerouted to other hospitals in the area.

The security guard has been hospitalized, but his condition is unknown. Miami Valley Hospital President Mike Uhl has deemed the hospital secure and safe following the shooting. No members of the hospital staff were injured in the incident.

ohio police
Serial killer and former nurse's aide Donald Harvey called 'Angel of Death' died at 64, two days after he was badly beaten in an Ohio prison, March 30, 2017. In this photo, police keep the roads closed around Watts Hall following an attack on the campus of the Ohio State University in Columbus, Ohio, Nov. 28, 2016. Getty Images