The suspected perpetrator - a 31-year-old Swiss man - has been arrested and his "motive is under investigation", said the police.