A real estate developer on trial for fraudulent bankruptcy fired 13 shots inside the Milan Tribunal on Thursday, killing his lawyer, a co-defendant and a judge, and eluded court security before being captured 15 miles away.

The shooting raised concerns about security at Italy’s courthouses, where much of the surveillance has been outsourced to private contractors, and about Italy’s ability to protect visitors during the Milan Expo 2015 world’s fair, which opens May 1 and is expected to attract 20 million visitors over six months.

Premier Matteo Renzi pledged a robust investigation into how the gunman, identified as Claudio Giardiello, managed to bring a pistol into the monumental Fascist-era tribunal, where defendants and other visitors are required to pass through metal detectors, but accredited court officials, including lawyers, are not.

The chief federal prosecutor in Milan, Edmondo Bruti Liberati, told reporters it appeared Giardiello may have used a fake document to enter through the only pedestrian entrance not equipped with a metal detector and intended only for use by accredited court officials. He said the metal detectors at the other entrances were in good working order.

Bruti Liberati praised law enforcement officials who apprehended Giardiello at a shopping center in Vimercate more than an hour after the shooting. They had identified the license plate on his motor bike with video surveillance cameras and tracked his arrival in Vimercate.

Prosecutors said Giardiello, 57, was still armed with a loaded pistol and intended to kill another business partner whom he blamed for a failed real estate venture.

Giardiello pulled out the gun inside a third-floor bankruptcy courtroom after arguing with his lawyer, who had quit and was about to address the court, Bruti Liberati told a news conference. He shot the lawyer and two co-defendants before descending the stairs and encountering a business consultant, shooting him in the leg.

He continued to Judge Fernando Ciampi’s office, shooting him twice, prosecutors said. The judge and the lawyer died at the scene, while one of the co-defendants died later while being treated at a hospital.

As the shots rang out, court employees and lawyers barricaded themselves inside offices and courtrooms, taking cover under their desks while police hunted for the gunman.

“There was a lot of panic at the beginning when people came running toward us saying there was a person with a pistol who had been shooting,” said lawyer Mirko Ricetti, who heard a single shot being fired and said he locked himself in a first-floor court room with about 15 others. They remained inside for an hour until police told them that the building was secured.

Bruti Liberati said it appears the gunman left by the same entrance he entered the building, but that video surveillance cameras were still being reviewed.

At the time of the shooting, Italy’s top law enforcement official, Interior Minister Angelino Alfano, was meeting with authorities across town to discuss security measures for Expo, which already had been heightened after the terrorist attacks in Paris in January.

“What happened in Milan is something very serious and unacceptable … which should not have happened,” Alfano told reporters at the courthouse after meeting with the family of the slain judge.