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, a police statement said.

"There is a suspicion that the 16-year-old is a possible tacit accomplice to (Friday's) attack," it said. Police earlier said the gunman was a deranged Iranian-German who was fixated with mass killings but not inspired by Islamist militancy.

The Afghan youth was questioned after he contacted police following the shooting on Friday, the statement said. Investigators later uncovered contradictions in his statements, it said, without providing any further details.

A squad of police commandos arrested him around 6:15 p.m. at an apartment in the Munich neighborhood of Laim.

The gunman began planning the shooting attack a year ago after visiting the German city of Winnenden where another teenager killed 15 people in 2009, Bavarian officials said on Sunday.

The statement said the Afghan youth was also being investigated for his role in a Facebook posting that invited people to a meeting at a cinema near the Munich central train station, but it gave no further details.

Bavarian officials said on Sunday the gunman had lured people to the McDonald's restaurant where the shooting began on Friday, using a fake Facebook page he had created in May.

The Facebook page had used photographs and information from a Turkish woman's account, according to German media reports.

It was not immediately clear whether the same Facebook account was used to invite people to the cinema meeting, when that meeting was due to occur, or if further violence was expected there.

The police statement added, however, that it would use all means necessary to prevent "further copycat crimes."

"Such actions endanger people and trigger police measures for which those responsible will be held fully responsible," the statement said.

A spokeswoman had no further information on the Facebook issue, or how long the Afghan youth had been in Germany.