Police are also inspecting a video believed to have been posted by the gunman in which he pushes a baseless, pro-Trump conspiracy theory.
A 43-year-old German man who posted a manifesto calling for the "complete extermination" of many "races or cultures in our midst" shot and killed nine people of foreign background, most of them Turkish, in an attack on a hookah bar and other sites in a Frankfurt suburb, authorities said Thursday.
He was later found dead at his home along with his mother, and authorities said they were treating the rampage as an act of domestic terrorism.
The gunman first attacked the hookah bar and a neighboring cafe in Hanau at about 10 p.m. Wednesday, killing several people, then traveled about 2.5 kilometers (1.5 miles) and opened fire again, first on a car and then a sports bar, claiming more victims.
The bloodshed came amid growing concerns about far-right violence in Germany and stepped-up efforts from authorities to crack down on it, including last week's detention of a dozen men on suspicion they were planning attacks against politicians and minorities.
Chancellor Angela Merkel said the shootings exposed the "poison" of racism in Germany, and she pledged to stand up against those who seek to divide the country.
"There is much to indicate that the perpetrator acted out of far-right extremist, racist motives," she said. "Out of hatred for people with other origins, other faiths, or a different appearance."
Hookah lounges are places where people gather to smoke flavored tobacco from Middle Eastern water pipes, and Metin Kan, who knew many of the victims, said it was obvious why the gunman chose the neighborhood.
"Look, a hookah bar there, a gaming parlor there, a doner kebab place there — it's a place frequented by immigrants," he said. "Why this hatred of foreigners? We all get along here."
People of Turkish background make up Germany's single largest minority, and Turkey's ambassador said five of the people killed in the attack were Turkish citizens.
Germany's federal prosecutor, Peter Frank, said that all nine people killed were of foreign backgrounds and that six others were injured, one seriously.
Investigators said it appeared the gunman acted alone, but Frank said the "goal of the investigation is to find out whether there were, or are, people who knew of, or supported" the attacks. He added that his office was looking into any contacts the killer may have had inside Germany and abroad.
Kadir Kose, who ran over from a cafe he runs nearby after hearing the first shots, said he was shocked at the extent of the violence. While fights or stabbings aren't unheard of, he said, "this is a whole other level, something we hear about from America."
Witnesses and surveillance videos of the getaway car led authorities quickly to the gunman's home, said Peter Beuth, interior minister for the state of Hesse. Both the attacker and his 72-year-old mother had gunshot wounds, and the weapon was found on him, Beuth said.
Frank identified the gunman only as Tobias R., in line with German privacy laws, and confirmed he had posted extremist videos and a manifesto with "confused ideas and far-fetched conspiracy theories" on his website.
The man identified himself as Tobias Rathjen on the website, which has now been taken down, with a mailing address matching that where the bodies of the killer and his mother were found.
In the manifesto, Rathjen claimed to have approached police several times with conspiracy theories, but Beuth said it does not appear the gunman had a criminal record or was on the radar of Germany's domestic intelligence agency.
Among the documents posted to the man's website, which has since been taken down, was a 24-page, rambling manifesto in German detailing, among other things, fears that he has been under government surveillance for years. He blamed the surveillance for his inability to have a relationship with a woman. He also called for genocide.
"We now have ethnic groups, races or cultures in our midst that are destructive in every respect," he wrote. He said he envisioned first a "rough cleaning" and then a "fine cleaning" that could halve the world's population.
He wrote: "The following people must be completely exterminated: Morocco, Algeria, Tunisia, Libya, Egypt, Israel, Syria, Jordan, Lebanon, the complete Arabian Peninsula, Turkey, Iraq, Iran, Kazakhstan, Turkmenistan, Usbekistan, India, Pakistan, Afghanistan, Bangladesh, Vietnam, Laos, Cambodia and the Philippines."
The attack was quickly condemned by many organizations, including the Central Council of Muslims, the Confederation of Kurdish Associations in Germany, and the Central Council of Jews.
"Everything will be done to investigate the circumstances of these terrible murders," Merkel pledged, declaring: "Racism is a poison. Hatred is a poison."
"This poison exists in our society and its is responsible for far too many crimes," she added, citing the killings committed by a far-right gang known as the NSU, the fatal shooting last year of a regional politician from her party, and a deadly attack on a synagogue in Halle in October.
Turkish President Recep Tayyip Erdogan called it a "heinous attack" and expressed confidence that German authorities "will exert all kinds of effort to shed light on all aspects of this attack."
German police were examining a video the gunman may have posted online several days before the attack in which he detailed a conspiracy theory about child abuse in the United States, Germany's dpa reported. The authenticity of the video couldn't immediately be verified, but the YouTube account was under the same name as the website containing the gunman's manifesto.
In the video, the speaker said he was delivering a "personal message to all Americans" that "your country is under control of invisible secret societies." In a slow and deliberate voice in accented English, he said there are "deep underground military bases" in which "they abuse, torture and kill little children."
He made no reference to the far-right fringe QAnon movement in the United States, but the message was similar to the movement's central, baseless belief that Donald Trump is waging a secret campaign against enemies in the "deep state" and a child sex trafficking ring run by satanists and cannibals.
In his manifesto, he made one reference to Trump, writing: "I doubt that Donald Trump knowingly implements my recommendations." He suggested that "mind control" might be at work.
On the website, Rathjen wrote that he was born in Hanau in 1977 and grew up in the city, later training with a bank and earning a business degree in 2007.