As many as four people are reported to have died after a man opened fire at the Palace of Justice in the Italian city of Milan before being arrested.
Officials said the gunman, identified by local media as Claudio Giardiello, was a defendant in a bankruptcy case.
The Ansa news agency said he shot a bankruptcy court judge, a lawyer and one other man. The fourth person is thought to have had a heart attack.
The suspect was arrested in the suburb of Vimercate as he fled on a motorbike.
Interior Minister Angelino Alfano said the “presumed assassin” was now being held at a carabinieri military police barracks in the Milan area.
The incident has prompted questions about security at the courthouse, focusing on how the gunman managed to smuggle a weapon into the building, use it several times and escape.
Mr Giardiello, seen here in a picture released by police, was arrested on the outskirts of Milan
The sound of gunfire sparked panic inside the Palace of Justice on Wednesday morning, with hundreds of people pouring down stairways towards the exits while police and military police officers searched for the gunman.
“All of a sudden we heard at least three or four shots,” lawyer Marcello Ilia told the AFP news agency outside the building.
“We tried to find out what was going on. There were suddenly lots of police officers who told us not to leave the room, they shut us in,” he said.
“After a few minutes we came out. They told us someone in a suit and tie was armed and at large in the court.”
Women were first to be evacuated by police from the Palace of Justice
Citing officials and witnesses, the newspaper La Repubblica reported that the gunman had been attending a bankruptcy hearing when a fight broke out inside the third floor courtroom.
He pulled out a weapon and shot the lawyer, who has been named as Lorenzo Alberto Claris Appiani, as well as another man. The lawyer was hit in the chest and died soon afterwards, while the second victim died of his wounds in hospital.
The gunman then left the courtroom and headed to the office of appeals court judge, Fernando Ciampi, shooting him dead.
It is not known if the gunman had any links to the judge. The Associated Press news agency quoted a prosecutor, Edmondo Bruti Liberati, as identifying the other victims as the gunman’s lawyer in a fraudulent bankruptcy case, and his co-defendant.
Police searched the building for the gunman but he managed to escape
A fourth person was found dead inside the building after apparently suffering a heart attack, possibly brought on by the shooting.
After hiding inside the Palace of Justice for more than an hour, the gunman fled on a motorbike, according to La Repubblica. He was arrested by carabinieri officers in Vimercate, about 25km (15 miles) north-east of central Milan, near the town of Monza.
Mr Giardiello was described as “aggressive” and “a little paranoid” by his former lawyer, Valerio Maraniello, in comments quoted by AFP news agency.
Visitors to the Palace of Justice have to pass through metal detectors.
The court building is in the centre of Milan, only a few streets away from the city’s cathedral
Lawyers and courthouse employees with official identification are, however, regularly waved through, according to the Associated Press.
Ansa reported that one of the metal detectors was broken on Wednesday morning.
“It’s disturbing that just anyone can get into the Palace of Justice armed,” said the head of the Lombardy region, Roberto Maroni.
“The fact that we’re not talking about an organisation which surveyed the place first makes it even more perturbing.”
The Palace of Justice is in the centre of Milan, only a few streets away from the city’s cathedral and main shopping district.