German police arrested a 16-year-old Afghan youth on Sunday on suspicion of a connection to the killing of nine people by an 18-year-old gunman in Munich, authorities said.

The youth was under investigation for possibly having failed to report the plans of the gunman, who later shot himself, and may have played a role in a Facebook posting that invited people to the scene of the shooting, a police statement said.

"There is a suspicion that the 16-year-old is a possible tacit accomplice to (Friday's) attack," the police said.

Police earlier said the gunman, Ali Sonboly, was a deranged Iranian-German who was fixated with mass killings but not inspired by Islamist militancy.