A gunman who fired his weapon outside of a Phoenix health care facility where an incapacitated patient gave birth last year was shot Monday by an officer, police said.

Three officers working privately for Hacienda HealthCare found the man in the parking lot of one of its facilities in Phoenix holding a gun and standing over a woman who was on the ground, Phoenix Police spokesman Sgt. Armando Carbajal said.

When the officers approached the man, he fled and started firing shots in the direction of the woman, Carbajal said.

One of the officers, who works with the Florence, Arizona, police department, fired at the man and "ended the threat," Carbajal said. The suspect was hospitalized in critical condition.

Hacienda HealthCare said in a statement that the suspect is the ex-husband of one of its staffers. The statement said the gunman never gained access to any facility buildings.

"We are releasing this statement to prevent misinformation, and to reassure the families of our residents that their loved ones were not in danger. Our security worked as intended and it continues to be improved on a daily basis," the statement said.

The center where the shooting occurred houses the Hacienda Skilled Nursing Facility in addition to the Hacienda Intermediate Care Facility, which the company announced last month would be closed after the incapacitated patient gave birth in December. Nathan Sutherland, 36, a former nurse at the center, was arrested Jan. 22 in connection with the case and charged with sexual assault. He has since pleaded not guilty.