As the people of Hanau rallied together in the wake of a deadly and racist assault on its community, there were not just whispers filled with fear but also cries for help and shouts of anger.

“We are going through a very difficult time,” said Hidir Karademir, 65, one of more than 5,000 who had gathered at the town’s market square, just streets away from the shisha bar where a racist gunman took the lives of nine people.

“It’s really shocking to see this kind of hatred arrive in the Rhine-Main area, where multiculturalism has been our way of life for decades,” Karademir said. “We want to shape our future together, and if we don’t stand side by side in situations like this, then we’re in trouble.”

In Hesse, multiculturalism is not seen as a modern phenomenon forced on society with the 2015 influx of refugees, as it is in parts of former East Germany. The western state has the most ethnically diverse population in Germany, if you exclude the small city state of Bremen; in Frankfurt, half the population has a migrant background, most of them with roots in Turkey and Poland.

The Turkish and Kurdish community in particular has long been part of the area’s DNA. The novelist Jakob Arjouni’s Frankfurt-set Kayankaya detective novels, about a hard-drinking Turkish-German detective with a broad Hessian dialect, were first published 35 years ago.

“Hanau is a city of migration,” said Newroz Duman, 30, an active member of Hanau’s Kurdish community. “You never have to look over your shoulder here out of fear that someone might spit at you because you have black hair. I’ve been to Saxony, you know – Hanau is different. I’m always happy when I come back here.”

Yet the region is not immune to flashes of far-right extremism either. It was in nearby Kassel that the neo-Nazi Stephan Ernst murdered the CDU politician Walter Lübcke to take “revenge” for his pro-refugee views in June last year. The city was also where a rightwing extremist terror network, the National Socialist Underground (NSU), murdered 21-year-old Halit Yozgat in his family’s internet cafe in 2006.

Speaking in Hanau market square on Thursday evening, the German president, Frank-Walter Steinmeier, said the terror attack had inflicted a “deep wound” on the town’s community. But for many people this week’s events have merely reopened a wound that had been festering since the true extent of the NSU killings was exposed in 2011.

Initially ignored as the result of local gang warfare and belittled as “doner murders”, the NSU murders left behind lingering distrust of the state government that flared again during Thursday’s wake. As the state premier, Volker Bouffier, took to the microphone, there were chants of “Release the NSU files” from the crowds.

Many of Germany’s domestic intelligence agency’s files on the activities of the NSU have been destroyed under dubious circumstances, and a 2014 report into Yozgat’s murder has been restricted from public view for 120 years.

“Today they say ‘never forget’, and tomorrow they will have forgotten the victims just like they did with the NSU,” muttered one young Turkish-German man in the crowd.

For people such as Karademir, the real concern is not that there are individuals in Hanau who hold rightwing extremist views, but that Germany’s security apparatus is not giving its full strength to protecting his community.

“Our biggest fear is not that there are people out there who hate us, but that rightwing extremists have infiltrated the institutions who are meant to protect us, like the police or the domestic intelligence agencies.”

Germany’s ex-spy chief Hans-Georg Maaßen, a CDU politician, has been publicly agitating for a hard-right policy turn in Angela Merkel’s party since being sacked by the chancellor, raising questions about the domestic intelligence agency’s priorities under his watch. “That someone like Hans-Georg Maaßen was able to be at the top of the federal office for the protection of the constitution, that’s scary,” said Karademir.

“What we are afraid of are not the people you can recognise as neo-Nazis in the street,” said Duman. “It’s the Nazi sympathisers in official functions that scare us. Who is there to protect us?

“Again and again we hear that the kind of people who carry out these attacks were being watched by intelligence agencies. Why were they not arrested? I want the state to take these rightwing extremist networks apart.”

On Friday morning Duman had come to the Kurdish cultural centre on the eastern outskirts of Hanau. Hundreds had visited the small club house since Wednesday night to support the family of 22-year-old Ferhat Ünvar, one of the victims of the attack.

The community had asked police for two buses to take friends and family to escort them to Thursday night’s wake in the market square, maybe even to say a few words from the podium, Duman said. Their request was not granted. In the end, only three politicians addressed the crowds. The names of the nine victims were not mentioned.