A man on trial for bankruptcy shot dead a judge, a lawyer and a co-defendant in the Palace of Jutice in central Milan on Thursday, emergency services said.
Police arrested the man, whom they named as Claudio Giardiello, in Vimercate, a town north of Italy's financial centre, Interior Minister Angelino Alfano tweeted. Police were holding him at a military barracks nearby, he said.
Emergency services said a fourth person was found dead in the court buildings with no apparent sign of injury. They gave no further details.
The court buildings are just half a mile (1 km) from Milan's cathedral or Duomo, a major tourist attraction. Police vans and an ambulance were parked outside the cordoned-off court buildings and the street was closed to traffic.
Security measures across Italy have been tightened following the Charlie Hebdo attacks in Paris in January and it was not immediately clear how the assailant was able to carry a gun past metal detectors and into the court buildings.
The incident raises questions about security at the city's public venues less than a month before the Milan Expo opens on May 1, the first time the city has held the world trade fair for more than a hundred years.
"I heard a series of shots, I threw myself in the first office I could find and I thought I was going to have a panic attack," Massimilano Monti, who works for a legal office inside the court, said.
"I have been coming here for 20 years, it's the first time something like this has happened."
Track Latest News Live on NDTV.com and get news updates from India and around the world