A 67-year-old gunman opened fire in a Copenhagen courthouse, killing a lawyer and seriously wounding the father of his three-year-old grandchild in connection with a custody dispute, authorities said.
The victims were a 57-year-old lawyer and his client, a 31-year-old man who was in a custody battle with the gunman's daughter, police and court officials said.
The gunman was arrested nearby and police seized a rifle used in the shooting, officials said.
"It is a family tragedy, not an attack on the court or the legal system," said Soeren Axelsen, head of the Copenhagen City Court.
Authorities did not release any names. The shooting happened in the bailiff's court, which is part of the city court.
Initial reports suggested one of the victims was shot inside the building and another outside, but Mr Axelsen later said both were shot inside the bailiff's court. The child's father then staggered outside where he collapsed.
He was taken to a hospital with serious wounds, but his condition was not life-threatening, police said.
The lawyer was pronounced dead at the scene.
Police cordoned off several streets around the building, which is next to City Hall.
The Ekstra Bladet tabloid posted a photo on its website showing a police officer aiming a weapon at a person on his knees, saying it showed the suspect being arrested.
Mr Axelsen said he believed it was the first ever shooting at the Copenhagen City Court, which was established in 1771.
Security is normally relaxed in Danish courts except for court sessions related to terrorism, criminal gangs and high-security cases where everyone but lawyers and judges must walk through metal detectors.