The gunman who killed nine people in Friday’s Munich shooting rampage appears to have bought his gun illegally on the internet and planned the attack for at least a year, investigators said on Sunday.

The shooter, identified by an official as 18-year-old Ali David Sonboly, used a reactivated pistol he probably bought illegally on the so-called dark net, investigators said, offering an initial explanation of how a teenager who had been treated for mental-health issues was able to access a firearm undetected.

...