Four suspected robbers and a security guard died in a shootout at an ATM in a Mexico City hospital, the Federal District's Public Safety Secretariat said.

The four robbers tried to stage a heist as three guards reloaded the ATM with cash Monday at the National Rehabilitation Institute in the southern section of Mexico City, the secretariat said in a statement.

The robbers, who were wearing hospital coats and had IDs, entered the facility through an emergency exit and made their way to the ATM, where the shootout occurred.

One of the guards, identified as Carlos Castro, "died at the scene from shots to the neck and chest," while the other two guards, Victor Ignacio Flores Montero and Miguel Angel Ontiveros Martinez, are being treated at different hospitals for gunshot wounds, the secretariat said.

"The four suspects responsible" for the shootout died at the scene, where five handguns were found by investigators, the secretariat said.

The National Rehabilitation Institute continued operating normally after the attempted robbery of the ATM, which is located on the hospital's lower level, the Health Secretariat said.

"The incident did not affect services or patients and relatives who were inside" the hospital, the secretariat said. EFE