HARRIS COUNTY, Texas – Deputies say a man upset about waiting at a Cypress hospital emergency room pulled a gun and opened fire before he was shot by security.

It happened at the North Cypress Medical Center northwest of Houston on Tuesday morning, the Harris County Sheriff’s Office says.

Deputies at the scene tell KHOU 11 News that a 21-year-old man with an unknown medical condition showed up at the E.R. He was apparently upset he had to wait for a doctor.

The hospital says they admitted him because he said he needed an X-ray, but he got angry after a nurse and doctor said he had to take his clothes off.

He then allegedly left the exam room, pulled a gun and fired at least one shot. An off-duty sheriff’s deputy working security then opened fire on the suspect, critically injuring him.

“They encountered the male just outside the doors. They asked him to drop the weapon, it was a black handgun pistol, a 9 or 40. He refused their orders. Both officers discharged their weapons, hitting the man multiple times," said Cedrick Collier, HCSO.

Views from Air 11 showed several bullet casings marked on the ground outside the emergency room in the parking lot. Nearby there was a pool of blood.

Workers tell KHOU 11 News they were sheltered in place during the investigation, but the scene is now under control.

Deputies say the suspect in stable condition, even still he is being “combative.” The man’s identity has not been released.