A MAN on trial for fraudulent bankruptcy opened fire in a Milan courthouse, killing his lawyer, a co-defendant and a judge before being captured as he fled on a motorbike.

As the shots rang out in the fortress-like tribunal building, court employees barricaded themselves inside their offices and took cover under desks while police tried to track the gunman as he made his way through the building.

A fourth person died of a heart attack in the court building during the rampage.

“There was a lot of panic at the beginning when people came running towards us saying there was a person with a pistol who had been shooting,” said lawyer Mirko Ricetti, who locked himself in a courtroom on hearing shots.

Staff were eventually allowed to leave the building – women first, followed by the men, who had their court ID cards checked.

Interior minister Angelino Alfano said the suspect was caught by police in Vimercate, near Monza, indicating he had travelled some 15 miles from the scene before being captured.

An ambulance with escort was seen leaving the Vimercate police station.

Prosecutor Edmondo Bruti Liberati said the gunman first fired on his lawyer and co-defendant before seriously injuring a second co-defendant. He then “walked through the building, going down a floor, and killed the judge”, Mr Liberati said. He said it was not clear whether there was any relationship between the gunman and the judge.The judge was identified as Fernando Ciampi, who worked in the civil section of the bankruptcy court.

The gunman is believed to be a man named Claudio Giardiello, who was on trial with two others for fraudulent bankruptcy.

Giardiello’s former lawyer, Valerio Maraniello, said the case concerned a failed property business and that Giardiello had been “very unusual” and “very unusual” and “over the top” in his legal dealings.

The shooting immediately raised questions about how he had gained entry to the Fascist-era courthouse with a weapon.

The courthouse has metal detectors at the four main entrances, but lawyers and courthouse employees are regularly waved through.

“There’s no doubt that this episode signals a non-functioning of the protection mechanisms, which must be employed daily and which have worked for years at the Milan tribunal,” said deputy interior minister Filippo Bubbico, who added that an investigation would be carried out.