Chancellor Angela Merkel said the gunman suspected of killing 10 people -- nine of whom had "immigrant backgrounds" -- appeared to have acted out of "right-wing extremist, racist motives." Prosecutors said he posted xenophobic conspiracy theories online and was believed to have a far-right background.

The mass shooting in Hanau was Germany's third deadly attack linked to right-wing suspects in just a year. There have been countless other foiled attacks and threats.

Tina Dürr, a research assistant at the Hesse Democracy Center at Marburg University, said the trend was clear: "We did have attacks which we could call right-wing extremist terror before. What we see now is that it happens more often."

Experts said the recent rise in violent right-wing attacks goes hand in hand with the growing success of the Alternative for Germany (AfD) , which in 2017 became the first far-right party to win seats in Germany's parliament in almost 60 years.

"The AfD, as a far-right party, promotes apocalyptic far-right rhetoric, which ... paints a picture of an immediate threat that has to be addressed in any way possible," said Jan Rathje, a political scientist at the Amadeu Antonio Foundation in Berlin, which runs educational projects and researches right-wing extremism, racism and anti-Semitism.

AfD supporters gather in Berlin for a "demonstration for the future of Germany" in May 2018.

"They are basically promoting the same narratives that spread in the far-right conspiracy groups ... that white people are being exterminated via migration or other means, and that they have to react, and that now is the time or we will all be gone."

Rathje said there was a clear connection between the kind of toxic rhetoric the AfD is known for and someone deciding to "take the actions into their own hands."

The AfD was quick to dismiss any links between the party and the spate of extremist attacks. Jörg Meuthen, the federal spokesperson for the party, said the Hanau attack was "neither right-wing nor left-wing terror, this is a delusional act of a madman."

"Any form of politicization of this terrible act is a cynical mistake. Instead, all people in our country should mourn the loss of the victims together with their relatives," he said on his official Twitter account.

But according to Dürr, recent studies show that people who might have always believed in extreme right-wing ideology are now getting "activated" by the shift in mainstream politics. "We see that in the political arena, in the parliament, we have people who are more aggressive, and then the same fight takes place in the streets where we have people who feel the need to act on this," she said.

The AfD is now the largest opposition party in parliament. It focuses largely on rejecting migration and Islam -- directing much of its fury at Chancellor Angela Merkel's refugee policy. In the state of Hesse, where Wednesday's attack took place, the AfD gained 13% of the vote in the 2018 regional elections, up from 4% in 2013.

Simon Cornwall, an extremism expert and a fellow at the German Institute on Radicalization and De-radicalization Studies, said that while the AfD wants to distance itself from attacks like this one, their rhetoric is used by people who might want to attack for other reasons.

"Whereas before, they might have just been seen as some sort of lunatic going out in the street shooting people, now they say I'm actually doing it because of the rhetoric that I'm reading online because of this perception that we're in danger," he said.

Right-wing extremism on the rise

The German Office for Protection of the Constitution warned in June last year that right-wing extremism was on the rise in Germany. It said that there was evidence of a "high willingness" of right-wing extremists to use violence.

Its latest report on extremism said the authorities were aware of at least 24,100 people who were active within various far-right organizations. It added that more than half of them were classified as violent and that at the end of 2018, around 910 members of the far right scene in Germany scene had gun permits.

But the report also pointed out that the fragmentation of the extreme-right scene means there was a high danger of lone-wolf-style attacks by people who are not known to the authorities.

That seems to have been the case with the suspected killer from Hanau. Hesse's interior minister Peter Beuth said the suspect did not have a criminal record but he did have "xenophobic" material on his website.

Rathje said online radicalization is a growing problem. "On a quantitative level, we can see that the amount of racist, anti-Semitic, (homophobic) and transphobic comments on the internet -- and not to speak of anti-feminist rhetoric -- is on the rise in Germany, like in many Western countries," he said.

"There's a very strong tradition in Germany of right-wing terrorism which is more traditionally focused, like organizations with clear connections to neo-Nazism ... now the online [radicalism] culture has spread to Germany too," he said.