On the evening of February 17, 2017, a mass shooting began at the Royal Plaza shopping center, located in a disputed border area between the districts of Independencia and San Martín de Porres, and extending into a sector of Los Olivos, in northern Lima, Peru. By the time the attack ended in the early hours of February 18, six people had been killed, including the perpetrator, and nine others were injured.
The perpetrator was identified by police as Eduardo Glicerio Romero Naupay, a man born in Huánuco who had previously served in the Peruvian Navy, where he obtained a license to bear arms. The day before the shooting, municipal inspectors from Los Olivos had caught Romero informally selling food from a mobile cart in a restricted area and ordered him to vacate the site. Hours before the attack, Romero posted on Facebook stating he planned to kill the inspectors who had evicted him.
At around 10:00 p.m. on February 17, when municipal inspectors again attempted to remove Romero's cart, he shot inspector Martín Moreno Zavaleta three times, in the leg, face, and abdomen, mortally wounding him. Romero then fled toward the Royal Plaza shopping center, where he attempted to enter the DiLuna nightclub. A security worker who denied him entry was shot and wounded, and a security member from the nearby Zeven nightclub who tried to help her was shot and killed. Romero then fired indiscriminately inside and around the nightclub area, continuing his attack across two floors of the establishment even after one of his two pistols jammed. Victims included Gloria Mostacero, killed near a restaurant; a person killed at a fast food business; and Nicole Muñoz Peña, a business administration student, who was fatally shot inside a Banco de Crédito branch while trying to take refuge in the ATM area.
The attack ended when plainclothes police officer Lorenzo Machaca Esquía, who was off duty and in civilian clothing, confronted Romero at the bank's front door and shot him in the head, killing him. Some of the wounded were taken to a nearby clinic, where two more people later died of their injuries. A week after the shooting, inspector Martín Moreno Zavaleta, who had been in a coma since being shot, died of a cerebral infarction.
In the aftermath, then-President Pedro Pablo Kuczynski said the shooting reflected a "lack of control of clandestine pistols" and awarded Machaca for his actions. Machaca later said he received threats through social media, and a week after the attack was reported to police by his wife, who accused him of domestic abuse.