President Andres Manuel Lopez Obrador was travelling outside Mexico City at time of incident.

Four people were killed and two injured in a shooting on Saturday near Mexico‘s National Palace, the presidential residence in the historic centre of the capital, officials said.

President Andres Manuel Lopez Obrador was travelling outside Mexico City at the time.

Preliminary reports indicated that an armed man entered a building on a small street near the palace looking to relieve himself, city police said.

After two people in the building told him off, the man pulled out a pistol and opened fire. When police arrived, they found four people with gunshot wounds lying in the building’s courtyard and shot at the attacker.

Paramedics found the gunman dead, along with two other people, the police said. One of three people who were injured died en route to hospital.

More than 100 police officers quickly arrived and cordoned off the street, according to television images.

The building sits in a narrow, pedestrian-only street that opens onto an entrance of the National Palace used daily by government staff and reporters.

Lopez Obrador took office a year ago on promises to run a more austere government. In addition to cutting the president’s salary by half, he shed various trappings of power, including a large force of secret service-style bodyguards.

He also turned the luxurious Los Pinos presidential residence into a cultural centre and moved into the centuries-old National Palace.