Merkel said: "Racism is poison, hate is poison, and this poison is present in society and causes many crimes."
The German chancellor pledged that the authorities would do everything in their power to find out the circumstances of the attack.
The German federal prosecutor said that nine people were killed in this attack, including Germans and foreigners between the ages of 21 and 44 years.
The prosecution added, for the first time, that the suspect was a 43-year-old German man named Tobias R.
The suspect had posted a statement on the Internet with conspiracy theories and extremist racist views before killing his victims and then turning the gun on his mother to kill her and commit suicide.
He added that the suspect placed on his page video messages, vague ideas and ridiculous conspiracy theories pointing to highly racist views.