German authorities say they've arrested a 15-year-old boy whom they suspect of having planned a rampage and also believe was in contact with a teenager who killed nine people in Munich last week.

Prosecutors and police in Ludwigsburg say the boy was arrested Monday night and sent to a psychiatric facility. A witness said he came across an online chat between the suspect and the Munich shooter, who killed himself amid his July 22 attack.

Officials say there's no suspicion the 15-year-old knew of plans for the Munich attack.

Authorities say the 15-year-old published photos pointing to a possible rampage. They also found bullets, knives, escape plans for his school, chemicals and bomb-making instructions at his home.