HANAU, Germany — Ripped by grief and brimming with anger, the message from minority communities hit by Germany's latest far-right attack was clear: More must be done to address the country's extremist scourge.

German Interior Minister Horst Seehofer on Friday pledged a bigger police presence, particularly at vulnerable sites such as mosques, following the mass shootings that targeted hookah cafes in the town of Hanau. Nine people were killed in those attacks on Wednesday, with the 43-year-old gunman, Tobias Rathjen, later found dead alongside his mother at home.

“A trail of blood of right-wing extremism goes through our country to this day,” Seehofer said, describing it as “the greatest security threat” to the country.

Muslim and Kurdish community leaders complained that the awakening has come too slowly, with security agencies long distracted by the threat of Islamist extremism.

Minorities in Germany have watched with concern as the far right has established a foothold in mainstream politics. The unabashedly anti-immigrant Alternative for Germany, or AfD, is now the largest opposition party in the federal parliament and has fared well in regional elections, capitalizing on friction around Chancellor Angela Merkel’s decision to welcome more than a million refugees in 2015.

Germany also has seen a spike in violence linked to the far right. Wednesday night’s was the third deadly attack in less than a year, after a politician was fatally shot in June and a gunman attacked a synagogue in Halle in October, killing two.

Minority groups are calling not just for more protection, but also for the country to confront anti-immigrant, Islamophobic and ­anti-Semitic attitudes.

“We’re very sad about what happened, but also very angry,” said Leyla Acar, co-chairwoman of Kon-Med, an association of Kurds in Germany, adding that at least five of Wednesday’s shooting victims were Kurdish. “What are the politicians doing? They always say they are against racism, right-wing ­extremism, but what do they do?”

While German and European leaders have rallied to condemn what happened in Hanau, and anti-right-wing demonstrations have taken place in cities throughout Germany, the reaction from U.S. officials has been muted. President Trump and his outgoing ambassador to Germany, Richard Grenell, have remained conspicuously silent.

In Hanau — a small yet diverse city where many residents either were born abroad or are the children of migrants — Mayor Claus Kaminsky called for unity among his shaken constituents.

“Our city has just gone through its grimmest hours in peacetime,” he said Friday.

“We know where racism and hatred once led,” he added, referring to Nazi rule.

At an Islamic center a short drive away from the Midnight hookah bar, where Rathjen opened fire at around 10 p.m. on Wednesday night, Muslim community leader Khurrem Akhtar, 43, said that while most Germans were not racist, he was worried about the breakdown of red lines in recent years.

“There’s an us-versus-them mindset that can be felt sometimes,” he said. His community was resisting attempts to separate them from the rest of German society, he said. “We’re part of Germany, and we’re part of Hanau.”

It is the far right’s attempts to cleave divisions that German security officials say is of a particular concern. But Akhtar said mainstream political rhetoric — for instance, debates about whether ­Islam can be part of Germany — has contributed to the current climate.

“The AfD is a product of . . . an accumulation of many things that went wrong,” he said. “Everyone has to question whether one’s actions perhaps stoked hatred.”

Friends of victims assembled in front of the Midnight hookah bar on Friday, lighting candles placed at the edges of the police cordon. Among those gathered was Levent Güldag, 43, who voiced frustration about whether people like him will ever truly be accepted in Germany.

“I was born here. I grew up here. I have a German wife. I have three children,” he said. “There’s nothing more I can do to assimilate. I can’t color my hair so that I look more German, more Aryan.”

His 20-year-old son, he said, had lost one of his best friends in the shooting. In the tightknit community, many young residents knew at least one of the victims personally.

One of the Kurdish victims, Acar said, was a 23-year-old named Ferhat Ünver.

“His grandfather came to Germany 40 years ago,” she said. “His grandfather was one of those who built the streets in Hanau, and on those streets he was shot down for being an immigrant. He was born here, raised here.”

Seehofer said the Interior Ministry is doing what it can to prevent attacks. He pointed to the arrest last week of 12 people suspected of belonging to a far-right group plotting against targets associated with Muslims and asylum seekers. He said authorities had found an “unbelievably large number of grenades and explosives” in raids in recent days.

He said the government is also looking at how to thwart lone-wolf attacks, like the ones in Hanau and in Halle.

Rathjen was licensed to hold two weapons, according to prosecutors, leading to questions about how well gun laws meant to stop weapons being available to extremists are being enforced.

Only half of those who carry out right-wing and anti-Semitic crimes are known to security services beforehand, Holger Münch, president of Germany’s Federal Criminal Police Office, said Friday.

“That means we have to dig deeper into the structures,” he said.

Aiman Mazyek, secretary general of the Central Council of Muslims in Germany, said the lack of focus on the right wing was an error that ran through the security structure.

“The focus was on so-called Islamic terrorism and Islamic extremism,” he said. “We always demanded that other forms of extremism or hatred has to be addressed with the same intensity.”

Wednesday’s attack had been a “terrible endpoint,” he said, calling for better recognition of the problem of Islamophobia. “The first step is to name the problems,” he said.

German government officials said Friday that more needs to be done to legislate around incitement online.

In addition to railing against immigration, Rathjen’s online writing includes a mix of confused conspiratorial theories and warnings about supposed mind control and secret societies.

“One has to take note that such a terrible bloody act does not arise out of nothing,” Justice Minister Christine Lambrecht said. “Conspiracy theories, as obviously held by the perpetrator, are the breeding ground for hatred.”

But for minorities, fears about their safety in Germany are unlikely to be speedily allayed. Josef Schuster, the head of the country’s Jewish community, said the attack underscored the threats to all minorities in the country.

In Hanau, Ahmed Luqman, a 34-year-old taxi driver who has been in Germany for 10 years, said there is “a lot of fear everywhere.”

“I hope it doesn’t continue like this,” he said. “I hope it stops.”

Morris and Beck reported from Berlin.