MANILA — A disgruntled security guard who lost his job at an upscale mall in the Philippines went on a shooting rampage in Manila on Monday, injuring at least one person and holding dozens of other people hostage, before surrendering about 10 hours later, according to the police and news reports.

One person was shot and taken to a hospital, Francis Zamora, the mayor of the San Juan district, told ANC television after the gunman, identified as 31-year-old Archie Paray, attacked the V-Mall at Greenhills.

All of the hostages were freed, although the number of them was unclear: The mayor initially put the figure at 30, then revised that estimate to as many as 70, and the police did not provide a total.

“What is important is that we had zero casualties,” Mr. Zamora said. “That was what we wanted. That the hostages can all go out safe. Everyone was in shock, very traumatized, they had to be given time to recover. They were shocked. They really need to rest. There were no injuries except the one who was shot earlier.”